From f990f27f5c3926e189409af028323b35c0615f4f Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Thu, 6 May 2021 15:01:12 +0800 Subject: [PATCH] https://github.com/ansible-community/ansible-lint/pull/1540 --- playbooks/cleanup.yml | 16 ++++++++-------- playbooks/converge.yml | 4 ++-- playbooks/prepare.yml | 26 +++++++++++++------------- playbooks/tasks/debian.yml | 4 ++-- playbooks/tasks/redhat.yml | 6 +++--- playbooks/tasks/suse.yml | 6 +++--- roles/locales | 2 +- roles/python | 2 +- roles/sshd | 2 +- roles/timezone | 2 +- 10 files changed, 35 insertions(+), 35 deletions(-) diff --git a/playbooks/cleanup.yml b/playbooks/cleanup.yml index 7d1c1d0..fa21941 100644 --- a/playbooks/cleanup.yml +++ b/playbooks/cleanup.yml @@ -32,7 +32,7 @@ rm -rf /root/.cache/* rm -rf /tmp/* changed_when: false - ignore_errors: true + failed_when: false - name: debian | apt-get -y clean raw: | @@ -42,7 +42,7 @@ apt-get -y clean rm -rf /var/lib/apt/lists/* changed_when: false - ignore_errors: true + failed_when: false - name: redhat | yum clean all raw: | @@ -50,7 +50,7 @@ yum clean all rm -rf /var/cache/yum/* changed_when: false - ignore_errors: true + failed_when: false - name: suse | zypper clean --all raw: | @@ -58,7 +58,7 @@ zypper clean --all rm -rf /var/cache/zypper/* changed_when: false - ignore_errors: true + failed_when: false - name: redhat | subscription-manager unregister raw: | @@ -67,7 +67,7 @@ subscription-manager unregister subscription-manager clean changed_when: false - ignore_errors: true + failed_when: false - name: truncate --size 0 /etc/machine-id raw: | @@ -75,18 +75,18 @@ truncate --size 0 /etc/machine-id ln -fs /etc/machine-id /var/lib/dbus/machine-id changed_when: false - ignore_errors: true + failed_when: false - name: rm -rf /etc/ssh/ssh_host_* raw: | set -eu rm -rf /etc/ssh/ssh_host_* changed_when: false - ignore_errors: true + failed_when: false - name: rm -rf /var/lib/systemd/random-seed raw: | set -eu rm -rf /var/lib/systemd/random-seed changed_when: false - ignore_errors: true + failed_when: false diff --git a/playbooks/converge.yml b/playbooks/converge.yml index 6b21904..e8d9b68 100644 --- a/playbooks/converge.yml +++ b/playbooks/converge.yml @@ -33,7 +33,7 @@ - "{{ ansible_os_family | lower }}.yml" paths: - "./vars" - ignore_errors: true + failed_when: false - name: include release specific tasks include_tasks: "{{ lookup('first_found', _params) }}" @@ -47,7 +47,7 @@ - "{{ ansible_os_family | lower }}.yml" paths: - "./tasks" - ignore_errors: true + failed_when: false - name: include default tasks include_tasks: "./tasks/main.yml" diff --git a/playbooks/prepare.yml b/playbooks/prepare.yml index 9cee170..aaa6741 100644 --- a/playbooks/prepare.yml +++ b/playbooks/prepare.yml @@ -27,7 +27,7 @@ --password={{ lookup('env', 'REDHAT_PASSWORD') }} \ --auto-attach changed_when: false - ignore_errors: true + failed_when: false - name: debian | apt-get install python3 python3-dev raw: | @@ -36,7 +36,7 @@ DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-dev changed_when: false - ignore_errors: true + failed_when: false - name: redhat | yum install python3 python3-devel raw: | @@ -45,7 +45,7 @@ yum update -y yum install -y python3 python3-devel changed_when: false - ignore_errors: true + failed_when: false - name: suse | zypper install python3 python3-devel raw: | @@ -54,7 +54,7 @@ zypper -n update -y zypper -n install -y python3 python3-devel changed_when: false - ignore_errors: true + failed_when: false - hosts: all remote_user: root @@ -65,7 +65,7 @@ set -eu cp -rfT /etc/skel /root changed_when: false - ignore_errors: true + failed_when: false - name: setenforce 0 raw: | @@ -73,7 +73,7 @@ setenforce 0 sed -i 's/^SELINUX=.*$/SELINUX=permissive/g' /etc/selinux/config changed_when: false - ignore_errors: true + failed_when: false - name: systemctl stop firewalld.service raw: | @@ -81,7 +81,7 @@ systemctl stop firewalld.service systemctl disable firewalld.service changed_when: false - ignore_errors: true + failed_when: false - name: systemctl stop ufw.service raw: | @@ -89,7 +89,7 @@ systemctl stop ufw.service systemctl disable ufw.service changed_when: false - ignore_errors: true + failed_when: false - name: debian | apt-get install *.deb raw: | @@ -97,7 +97,7 @@ DEBIAN_FRONTEND=noninteractive apt-get install -y bzip2 ca-certificates curl gcc gnupg gzip iproute2 procps python3 python3-apt python3-cryptography python3-dev python3-jmespath python3-lxml python3-netaddr python3-pip python3-setuptools python3-venv python3-virtualenv python3-wheel sudo tar unzip xz-utils zip when: ansible_os_family | lower == "debian" changed_when: false - ignore_errors: true + failed_when: false - name: fedora | yum install *.rpm raw: | @@ -105,7 +105,7 @@ yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-cryptography python3-devel python3-jmespath python3-libselinux python3-lxml python3-netaddr python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz yum-utils zip when: ansible_distribution | lower == "fedora" changed_when: false - ignore_errors: true + failed_when: false - name: redhat-8 | yum install *.rpm raw: | @@ -114,7 +114,7 @@ yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-cryptography python3-devel python3-jmespath python3-libselinux python3-lxml python3-netaddr python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz yum-utils zip when: ansible_os_family | lower == "redhat" and ansible_distribution_major_version | lower == "8" changed_when: false - ignore_errors: true + failed_when: false - name: redhat-7 | yum install *.rpm raw: | @@ -124,7 +124,7 @@ yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python36-cryptography python3-devel python3-jmespath python3-libselinux python36-netaddr python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz yum-utils zip when: ansible_os_family | lower == "redhat" and ansible_distribution_major_version | lower == "7" changed_when: false - ignore_errors: true + failed_when: false - name: suse | zypper -n install *.rpm raw: | @@ -132,7 +132,7 @@ zypper -n install -y bzip2 ca-certificates curl gcc gpg2 gzip iproute2 procps python3 python3-cryptography python3-devel python3-jmespath python3-lxml python3-netaddr python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz zip when: ansible_os_family | lower == "suse" changed_when: false - ignore_errors: true + failed_when: false - name: reboot reboot: diff --git a/playbooks/tasks/debian.yml b/playbooks/tasks/debian.yml index 02dba87..f2eeef3 100644 --- a/playbooks/tasks/debian.yml +++ b/playbooks/tasks/debian.yml @@ -53,12 +53,12 @@ - name: update-grub command: update-grub changed_when: false - ignore_errors: true + failed_when: false - name: update-initramfs -c -k all command: update-initramfs -c -k all changed_when: false - ignore_errors: true + failed_when: false - name: apt-get install qemu-guest-agent apt: diff --git a/playbooks/tasks/redhat.yml b/playbooks/tasks/redhat.yml index 1e2d0bd..af03547 100644 --- a/playbooks/tasks/redhat.yml +++ b/playbooks/tasks/redhat.yml @@ -18,7 +18,7 @@ command: yum-config-manager --{{ item.state }} {{ item.name }} loop: "{{ _yum_config_manager }}" changed_when: false - ignore_errors: true + failed_when: false - name: yum install yum: @@ -44,12 +44,12 @@ - name: grub2-mkconfig -o /boot/grub2/grub command: grub2-mkconfig -o /boot/grub2/grub changed_when: false - ignore_errors: true + failed_when: false - name: dracut -f command: dracut -f changed_when: false - ignore_errors: true + failed_when: false - name: yum install qemu-guest-agent yum: diff --git a/playbooks/tasks/suse.yml b/playbooks/tasks/suse.yml index 480b953..b7ac81b 100644 --- a/playbooks/tasks/suse.yml +++ b/playbooks/tasks/suse.yml @@ -19,7 +19,7 @@ set -eu rm -rf /etc/zypp/repos.d/* changed_when: false - ignore_errors: true + failed_when: false - name: zypper addrepo vars: @@ -61,12 +61,12 @@ - name: grub2-mkconfig -o /boot/grub2/grub command: grub2-mkconfig -o /boot/grub2/grub changed_when: false - ignore_errors: true + failed_when: false - name: dracut -f command: dracut -f changed_when: false - ignore_errors: true + failed_when: false - name: zypper install qemu-guest-agent zypper: diff --git a/roles/locales b/roles/locales index d294c53..bd32283 160000 --- a/roles/locales +++ b/roles/locales @@ -1 +1 @@ -Subproject commit d294c53a98d6f9c3bf1af7d65eb010b0729ada17 +Subproject commit bd3228315e0c3aa925eb664b3683a5594676aad5 diff --git a/roles/python b/roles/python index fc2714d..bc834d8 160000 --- a/roles/python +++ b/roles/python @@ -1 +1 @@ -Subproject commit fc2714df4f217910d751aa38c9c4114779eedcc1 +Subproject commit bc834d89dfa5b509b0df87d667ceab0a1d770f87 diff --git a/roles/sshd b/roles/sshd index 3653b61..5cd74e0 160000 --- a/roles/sshd +++ b/roles/sshd @@ -1 +1 @@ -Subproject commit 3653b6141694223aa51df5b87b847789b864e306 +Subproject commit 5cd74e091f24ca874b8b155311f74d3b1a3b5e6c diff --git a/roles/timezone b/roles/timezone index ecda258..3e144c1 160000 --- a/roles/timezone +++ b/roles/timezone @@ -1 +1 @@ -Subproject commit ecda258ec1add41afaf01496b7a407a724bc2311 +Subproject commit 3e144c1f82080197e27bc0eaa628d490a3d7edab