From 2ac552e0da3b8989549e68d3430b13089112ae70 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/ansible | 2 +- roles/bootstrap | 2 +- roles/docker | 2 +- roles/git | 2 +- roles/gitlab_runner | 2 +- roles/kernel | 2 +- roles/libvirt | 2 +- roles/locales | 2 +- roles/molecule | 2 +- roles/packer | 2 +- roles/python | 2 +- roles/sshd | 2 +- roles/timezone | 2 +- roles/vagrant | 2 +- roles/virtualbox | 2 +- 21 files changed, 46 insertions(+), 46 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 30d947d..c1f6bd0 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/ansible b/roles/ansible index 77e34f3..1fe44d8 160000 --- a/roles/ansible +++ b/roles/ansible @@ -1 +1 @@ -Subproject commit 77e34f3419039162d59bb1b7f7ec5a491077495a +Subproject commit 1fe44d83c9827e128126f255c315c9f9b73887ea diff --git a/roles/bootstrap b/roles/bootstrap index 454a376..524d70d 160000 --- a/roles/bootstrap +++ b/roles/bootstrap @@ -1 +1 @@ -Subproject commit 454a37678c8548151ff91aedfe8777c09b747eea +Subproject commit 524d70da26e006264daed5469d0f385f4a20b1fd diff --git a/roles/docker b/roles/docker index b7e735a..9f6af54 160000 --- a/roles/docker +++ b/roles/docker @@ -1 +1 @@ -Subproject commit b7e735ad901ab0452ad9cc6816c57a0a01657871 +Subproject commit 9f6af54cf325df53982b82c971b187674d505c1e diff --git a/roles/git b/roles/git index ee5d9b2..c9b487c 160000 --- a/roles/git +++ b/roles/git @@ -1 +1 @@ -Subproject commit ee5d9b21bbab2ee85f3b505f221b28ee2058b828 +Subproject commit c9b487cc8f0f85ffa8670db2836f28fb807f50ba diff --git a/roles/gitlab_runner b/roles/gitlab_runner index 7c2dc7d..374133a 160000 --- a/roles/gitlab_runner +++ b/roles/gitlab_runner @@ -1 +1 @@ -Subproject commit 7c2dc7d19e6f60c4a2149e135a0980c8dd530b63 +Subproject commit 374133aaab95d8e32fdc8e6f96a2e57ac7e2e2bc diff --git a/roles/kernel b/roles/kernel index 6e8492a..a7c5280 160000 --- a/roles/kernel +++ b/roles/kernel @@ -1 +1 @@ -Subproject commit 6e8492ae903e31451c7f775a41950b6ffa0a599c +Subproject commit a7c52806bafb6a97d5add53ed855afe7db51ac1b diff --git a/roles/libvirt b/roles/libvirt index 9207e8f..5b39f92 160000 --- a/roles/libvirt +++ b/roles/libvirt @@ -1 +1 @@ -Subproject commit 9207e8f3701e5c9bb949017a26eb7664600c9758 +Subproject commit 5b39f92bfd43994badf6a639272c95dd6b1686b8 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/molecule b/roles/molecule index 8420f4b..812964c 160000 --- a/roles/molecule +++ b/roles/molecule @@ -1 +1 @@ -Subproject commit 8420f4bcf7187257ab853bb5501dcd857e83a071 +Subproject commit 812964cfe2ca1c5142d61f6f783710f2c5c618a6 diff --git a/roles/packer b/roles/packer index c320a60..7ac0583 160000 --- a/roles/packer +++ b/roles/packer @@ -1 +1 @@ -Subproject commit c320a60726387d3d9ae651383d8eafe3838787b0 +Subproject commit 7ac0583d3bd7147df3c8823cfdfd7ad0e030247c 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 diff --git a/roles/vagrant b/roles/vagrant index c6fb49f..69a4a02 160000 --- a/roles/vagrant +++ b/roles/vagrant @@ -1 +1 @@ -Subproject commit c6fb49f9384be43523b9521049d009fc4286207e +Subproject commit 69a4a0226caae949aa1d8c6b030766fa51de4c45 diff --git a/roles/virtualbox b/roles/virtualbox index 5bce125..e9afb26 160000 --- a/roles/virtualbox +++ b/roles/virtualbox @@ -1 +1 @@ -Subproject commit 5bce125e01cd66b43fe6399f159b7d634101c1e4 +Subproject commit e9afb26eec4090715678a4e97b9e49796463d445