Drop duplicate when keys introduced in fafff25c20
gitea/ansible-roles/pipeline/head This commit looks good Details

This commit is contained in:
David Prevot 2022-12-12 14:29:07 +01:00
parent b02400fd84
commit d4f58b9395
10 changed files with 54 additions and 36 deletions

View File

@ -160,8 +160,9 @@
dest: '/home/{{ user.name }}/.profile'
insertafter: EOF
line: 'trap "sudo /usr/share/scripts/evomaintenance.sh" 0'
when: grep_profile_evomaintenance.rc != 0
when: not ansible_check_mode
when:
- grep_profile_evomaintenance.rc != 0
- not ansible_check_mode
# SSH keys

View File

@ -13,23 +13,26 @@
template: debian
state: stopped
template_options: "--arch amd64 --release {{ release }}"
when: container_exists.stdout_lines | length == 0
when: not ansible_check_mode
when:
- container_exists.stdout_lines | length == 0
- not ansible_check_mode
- name: "Disable network configuration inside container {{ name }}"
replace:
name: "/var/lib/lxc/{{ name }}/rootfs/etc/default/networking"
regexp: "^#CONFIGURE_INTERFACES=yes"
replace: CONFIGURE_INTERFACES=no
when: lxc_network_type == "none"
when: not ansible_check_mode
when:
- lxc_network_type == "none"
- not ansible_check_mode
- name: "Disable interface shut down on halt inside container {{ name }} (Jessie container)"
lineinfile:
name: "/var/lib/lxc/{{ name }}/rootfs/etc/default/halt"
line: "NETDOWN=no"
when: lxc_network_type == "none" and release == "jessie"
when: not ansible_check_mode
when:
- lxc_network_type == "none" and release == "jessie"
- not ansible_check_mode
- name: "Make the container {{ name }} poweroff on SIGPWR sent by lxc-stop (Jessie container)"
file:
@ -55,8 +58,9 @@
name: "/var/lib/lxc/{{ name }}/rootfs/etc/rc.local"
line: "chmod 755 /dev"
insertbefore: "^exit 0$"
when: release == 'jessie'
when: not ansible_check_mode
when:
- release == 'jessie'
- not ansible_check_mode
- name: "Ensure that {{ name }} container is running"
lxc_container:

View File

@ -32,8 +32,9 @@
removes: /var/lib/munin/localdomain
notify: restart munin-node
when: not ansible_hostname == "localdomain"
when: not ansible_check_mode
when:
- not ansible_hostname == "localdomain"
- not ansible_check_mode
tags:
- munin

View File

@ -155,8 +155,9 @@
src: "{{ _mysql_scripts_dir }}/mysql-optimize.sh"
dest: /etc/cron.{{ mysql_cron_optimize_frequency | mandatory }}/mysql-optimize.sh
state: link
when: mysql_cron_optimize | bool
when: not ansible_check_mode
when:
- mysql_cron_optimize | bool
- not ansible_check_mode
tags:
- mysql

View File

@ -36,5 +36,6 @@
mode: "0644"
loop:
- { option: "date.timezone", value: "Europe/Paris" }
when: php_symfony_requirements | bool
when: not ansible_check_mode
when:
- php_symfony_requirements | bool
- not ansible_check_mode

View File

@ -95,8 +95,9 @@
file:
dest: /etc/php/{{ php_version }}/fpm
mode: "0755"
when: php_fpm_enable
when: not ansible_check_mode
when:
- php_fpm_enable
- not ansible_check_mode
- include: config_apache.yml
when: php_apache_enable
@ -105,8 +106,9 @@
file:
dest: /etc/php/{{ php_version }}/apache2
mode: "0755"
when: php_apache_enable
when: not ansible_check_mode
when:
- php_apache_enable
- not ansible_check_mode
- include: sury_post.yml
when: php_sury_enable

View File

@ -84,8 +84,9 @@
file:
dest: /etc/php/7.3/fpm
mode: "0755"
when: php_fpm_enable | bool
when: not ansible_check_mode
when:
- php_fpm_enable | bool
- not ansible_check_mode
- include: config_apache.yml
when: php_apache_enable | bool
@ -94,8 +95,9 @@
file:
dest: /etc/php/7.3/apache2
mode: "0755"
when: php_apache_enable | bool
when: not ansible_check_mode
when:
- php_apache_enable | bool
- not ansible_check_mode
- include: sury_post.yml
when: php_sury_enable | bool

View File

@ -73,8 +73,9 @@
file:
dest: /etc/php5/fpm
mode: "0755"
when: php_fpm_enable | bool
when: not ansible_check_mode
when:
- php_fpm_enable | bool
- not ansible_check_mode
- include: config_apache.yml
when: php_apache_enable | bool
@ -83,5 +84,6 @@
file:
dest: /etc/php5/apache2
mode: "0755"
when: php_apache_enable | bool
when: not ansible_check_mode
when:
- php_apache_enable | bool
- not ansible_check_mode

View File

@ -85,8 +85,9 @@
file:
dest: /etc/php/7.0/fpm
mode: "0755"
when: php_fpm_enable | bool
when: not ansible_check_mode
when:
- php_fpm_enable | bool
- not ansible_check_mode
- include: config_apache.yml
when: php_apache_enable | bool
@ -95,8 +96,9 @@
file:
dest: /etc/php/7.0/apache2
mode: "0755"
when: php_apache_enable | bool
when: not ansible_check_mode
when:
- php_apache_enable | bool
- not ansible_check_mode
- include: sury_post.yml
when: php_sury_enable | bool

View File

@ -31,8 +31,9 @@
file:
dest: /etc/php/7.4/apache2
mode: "0755"
when: php_apache_enable | bool
when: not ansible_check_mode
when:
- php_apache_enable | bool
- not ansible_check_mode
- name: Symlink Evolix FPM config files from 7.4 to 7.0
file:
@ -51,5 +52,6 @@
file:
dest: /etc/php/7.4/fpm
mode: "0755"
when: php_fpm_enable | bool
when: not ansible_check_mode
when:
- php_fpm_enable | bool
- not ansible_check_mode