Jérémy Lecour
ee21973371
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2777|524|2253|2462|:+1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/223//ansiblelint">Evolix » ansible-roles » unstable #223</a>
gitea/ansible-roles/pipeline/head This commit looks good
Fully Qualified Collection Name
113 lines
3.8 KiB
YAML
113 lines
3.8 KiB
YAML
---
|
|
|
|
- name: "Set custom values for PHP config (jessie)"
|
|
community.general.ini_file:
|
|
dest: /etc/php5/apache2/conf.d/zzz-evolinux-custom.ini
|
|
section: PHP
|
|
option: "disable_functions"
|
|
value: "shell-exec,system,passthru,putenv,popen"
|
|
notify: reload apache2
|
|
when: ansible_distribution_release == "jessie"
|
|
|
|
- name: "Set custom values for PHP config (Debian 9)"
|
|
community.general.ini_file:
|
|
dest: /etc/php/7.0/apache2/conf.d/zzz-evolinux-custom.ini
|
|
section: PHP
|
|
option: "disable_functions"
|
|
value: "shell-exec,system,passthru,putenv,popen"
|
|
notify: reload apache2
|
|
when: ansible_distribution_release == "stretch"
|
|
|
|
- name: "Set custom values for PHP config (Debian 10)"
|
|
community.general.ini_file:
|
|
dest: /etc/php/7.3/apache2/conf.d/zzz-evolinux-custom.ini
|
|
section: PHP
|
|
option: "disable_functions"
|
|
value: "shell-exec,system,passthru,putenv,popen"
|
|
notify: reload apache2
|
|
when: ansible_distribution_release == "buster"
|
|
|
|
- name: "Set custom values for PHP config (Debian 11)"
|
|
community.general.ini_file:
|
|
dest: /etc/php/7.4/apache2/conf.d/zzz-evolinux-custom.ini
|
|
section: PHP
|
|
option: "disable_functions"
|
|
value: "shell-exec,system,passthru,putenv,popen"
|
|
notify: reload apache2
|
|
when: ansible_distribution_release == "bullseye"
|
|
|
|
- name: "Set custom values for PHP config (Debian 11)"
|
|
community.general.ini_file:
|
|
dest: /etc/php/8.1/apache2/conf.d/zzz-evolinux-custom.ini
|
|
section: PHP
|
|
option: "disable_functions"
|
|
value: "shell-exec,system,passthru,putenv,popen"
|
|
notify: reload apache2
|
|
when: ansible_distribution_release == "bookworm"
|
|
|
|
- name: Install evoadmin VHost
|
|
ansible.builtin.template:
|
|
src: "{{ item }}"
|
|
dest: /etc/apache2/sites-available/evoadmin.conf
|
|
force: "{{ evoadmin_force_vhost }}"
|
|
loop: "{{ query('first_found', templates) }}"
|
|
vars:
|
|
templates:
|
|
- "templates/evoadmin-web/evoadmin.{{ inventory_hostname }}.conf.j2"
|
|
- "templates/evoadmin-web/evoadmin.{{ host_group | default('all') }}.conf.j2"
|
|
- "templates/evoadmin-web/evoadmin.conf.j2"
|
|
- "templates/evoadmin.conf.j2"
|
|
register: evoadmin_vhost_template
|
|
notify: reload apache2
|
|
|
|
- name: Enable evoadmin vhost
|
|
ansible.builtin.command:
|
|
cmd: "a2ensite evoadmin.conf"
|
|
register: cmd_a2ensite
|
|
changed_when: "'Enabling site' in cmd_a2ensite.stdout"
|
|
notify: reload apache2
|
|
when: evoadmin_enable_vhost | bool
|
|
|
|
- name: Disable evoadmin vhost
|
|
ansible.builtin.command:
|
|
cmd: "a2dissite evoadmin.conf"
|
|
register: cmd_a2dissite
|
|
changed_when: "'Disabling site' in cmd_a2dissite.stdout"
|
|
notify: reload apache2
|
|
when: not (evoadmin_enable_vhost | bool)
|
|
|
|
- name: Copy htpasswd for evoadmin
|
|
ansible.builtin.template:
|
|
src: "{{ item }}"
|
|
dest: "/var/www/.ansible_evoadmin_htpasswd"
|
|
mode: "0644"
|
|
owner: root
|
|
group: www-data
|
|
force: "{{ evoadmin_htpasswd_force }}"
|
|
loop: "{{ query('first_found', templates) }}"
|
|
vars:
|
|
templates:
|
|
- "templates/evoadmin-web/htpasswd.{{ inventory_hostname }}.j2"
|
|
- "templates/evoadmin-web/htpasswd.{{ host_group | default('all') }}.j2"
|
|
- "templates/evoadmin-web/htpasswd.j2"
|
|
- "templates/htpasswd.j2"
|
|
register: evoadmin_htpasswd_template
|
|
when: evoadmin_htpasswd | bool
|
|
|
|
- name: Copy config file for evoadmin
|
|
ansible.builtin.template:
|
|
src: "{{ item }}"
|
|
dest: "{{ evoadmin_document_root }}/conf/config.local.php"
|
|
mode: "0640"
|
|
owner: evoadmin
|
|
group: evoadmin
|
|
force: "{{ evoadmin_config_local_php_force }}"
|
|
loop: "{{ query('first_found', templates) }}"
|
|
vars:
|
|
templates:
|
|
- "templates/evoadmin-web/config.local.{{ inventory_hostname }}.php.j2"
|
|
- "templates/evoadmin-web/config.local.{{ host_group | default('all') }}.php.j2"
|
|
- "templates/evoadmin-web/config.local.php.j2"
|
|
- "templates/config.local.php.j2"
|
|
register: evoadmin_config_local_php_template
|