Update to 2021-08-03 11:00

master
Daniel Berteaud 3 years ago
parent b84d0c8d90
commit a2e4a200e1
  1. 10
      roles/akeneo_pim/defaults/main.yml
  2. 1
      roles/akeneo_pim/tasks/archive_pre.yml
  3. 8
      roles/akeneo_pim/tasks/conf.yml
  4. 4
      roles/akeneo_pim/tasks/directories.yml
  5. 9
      roles/akeneo_pim/tasks/facts.yml
  6. 9
      roles/akeneo_pim/tasks/install.yml
  7. 14
      roles/akeneo_pim/templates/httpd.conf.j2
  8. 6
      roles/akeneo_pim/templates/logrotate.conf.j2

@ -28,9 +28,9 @@ pim_db_user: akeneopim_{{ pim_id }}
# Elasticsearch host # Elasticsearch host
pim_es_server: localhost:9200 pim_es_server: localhost:9200
# Public URL used to reach AKeneo # Public URL used to reach AKeneo. Note that you'll have to define a vhost for Akeneo PIM to be reachable
pim_public_url: http://{{ inventory_hostname }}/pim_{{ pim_id }} pim_public_url: http://pim.{{ inventory_hostname }}/
# If defined, an alias will be added in httpd's config to access pim # Define the initial admin password. If not defined, a random one will be generated ans stored under {{ pim_root_dir }}/meta/ansible_admin_pass
# Else, you'll have to defined a vhost to make pim accessible. See httpd_common role # Note that this is only used on initial install, and will be ignored for upgrades
pim_web_alias: /pim_{{ pim_id }} # pim_admin_pass: p@ssw0rd

@ -19,6 +19,7 @@
name: "{{ pim_db_name }}" name: "{{ pim_db_name }}"
target: "{{ pim_root_dir }}/archives/{{ pim_current_version }}/{{ pim_db_name }}.sql.xz" target: "{{ pim_root_dir }}/archives/{{ pim_current_version }}/{{ pim_db_name }}.sql.xz"
login_host: "{{ pim_db_server }}" login_host: "{{ pim_db_server }}"
login_port: "{{ pim_db_port }}"
login_user: "{{ pim_db_user }}" login_user: "{{ pim_db_user }}"
login_password: "{{ pim_db_pass }}" login_password: "{{ pim_db_pass }}"
quick: True quick: True

@ -86,4 +86,12 @@
hour: '*/2' hour: '*/2'
tags: pim tags: pim
- name: Create the admin user
command: /bin/php{{ pim_php_version }} {{ pim_root_dir }}/app/bin/console pim:user:create --admin -n -- admin {{ pim_admin_pass | quote }} admin@example.org Admin Admin fr_FR
when: pim_install_mode == 'install'
become_user: "{{ pim_user }}"
tags: pim
- name: Deploy logrotate conf
template: src=logrotate.conf.j2 dest=/etc/logrotate.d/akeneopim_{{ pim_id }}
tags: pim

@ -24,3 +24,7 @@
group: "{{ pim_user }}" group: "{{ pim_user }}"
mode: 700 mode: 700
tags: pim tags: pim
- name: Link the var directory to the data dir
file: src={{ pim_root_dir }}/data dest={{ pim_root_dir }}/app/var state=link
tags: pim

@ -27,3 +27,12 @@
- set_fact: pim_secret={{ rand_pass }} - set_fact: pim_secret={{ rand_pass }}
when: pim_secret is not defined when: pim_secret is not defined
tags: pim tags: pim
# Create a random admin pass if needed
- block:
- import_tasks: ../includes/get_rand_pass.yml
vars:
- pass_file: "{{ pim_root_dir }}/meta/ansible_admin_pass"
- set_fact: pim_admin_pass={{ rand_pass }}
when: pim_admin_pass is not defined
tags: pim

@ -8,6 +8,15 @@
- when: pim_install_mode == 'upgrade' - when: pim_install_mode == 'upgrade'
block: block:
- name: Stop jobs and event API services
service: name={{ item }} state=stopped
loop:
- akeneo-pim_{{ pim_id }}-jobs
- akeneo-pim_{{ pim_id }}-events-api
- name: Disable cron jobs
file: path=/etc/cron.d/akeneopim_{{ pim_id }} state=absent
- name: Wipe install on upgrades - name: Wipe install on upgrades
file: path={{ pim_root_dir }}/app state=absent file: path={{ pim_root_dir }}/app state=absent

@ -1,9 +1,3 @@
{% if pim_web_alias is defined and pim_web_alias != False %}
Alias /{{ pim_web_alias | regex_replace('^/','') }} {{ pim_root_dir }}/app/public
{% else %}
# No alias defined, create a vhost to access it
{% endif %}
<Directory {{ pim_root_dir }}/app/public> <Directory {{ pim_root_dir }}/app/public>
AllowOverride All AllowOverride All
Options FollowSymLinks Options FollowSymLinks
@ -22,15 +16,9 @@ Alias /{{ pim_web_alias | regex_replace('^/','') }} {{ pim_root_dir }}/app/publi
RewriteCond %{HTTP:Authorization} . RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller... # Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L] RewriteRule ^ index.php [QSA,L]
<FilesMatch "(\.git.*)"> <FilesMatch "(\.git.*)">
Require all denied Require all denied

@ -0,0 +1,6 @@
{{ pim_root_dir }}/data/logs/*.log {
daily
rotate 90
compress
missingok
}
Loading…
Cancel
Save