Skip to content

Commit

Permalink
https://github.com/ansible-community/ansible-lint/pull/1540
Browse files Browse the repository at this point in the history
  • Loading branch information
hswong3i committed May 6, 2021
1 parent 6cee9be commit 13204bf
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 35 deletions.
16 changes: 8 additions & 8 deletions playbooks/cleanup.yml
Expand Up @@ -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: |
Expand All @@ -42,23 +42,23 @@
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: |
set -eu
yum clean all
rm -rf /var/cache/yum/*
changed_when: false
ignore_errors: true
failed_when: false

- name: suse | zypper clean --all
raw: |
set -eu
zypper clean --all
rm -rf /var/cache/zypper/*
changed_when: false
ignore_errors: true
failed_when: false

- name: redhat | subscription-manager unregister
raw: |
Expand All @@ -67,26 +67,26 @@
subscription-manager unregister
subscription-manager clean
changed_when: false
ignore_errors: true
failed_when: false

- name: truncate --size 0 /etc/machine-id
raw: |
set -eu
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
4 changes: 2 additions & 2 deletions playbooks/converge.yml
Expand Up @@ -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) }}"
Expand All @@ -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"
Expand Down
26 changes: 13 additions & 13 deletions playbooks/prepare.yml
Expand Up @@ -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: |
Expand All @@ -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: |
Expand All @@ -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: |
Expand All @@ -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
Expand All @@ -65,47 +65,47 @@
set -eu
cp -rfT /etc/skel /root
changed_when: false
ignore_errors: true
failed_when: false

- name: setenforce 0
raw: |
set -eu
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: |
set -eu
systemctl stop firewalld.service
systemctl disable firewalld.service
changed_when: false
ignore_errors: true
failed_when: false

- name: systemctl stop ufw.service
raw: |
set -eu
systemctl stop ufw.service
systemctl disable ufw.service
changed_when: false
ignore_errors: true
failed_when: false

- name: debian | apt-get install *.deb
raw: |
set -eu
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: |
set -eu
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: |
Expand All @@ -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: |
Expand All @@ -124,15 +124,15 @@
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: |
set -eu
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:
Expand Down
4 changes: 2 additions & 2 deletions playbooks/tasks/debian.yml
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions playbooks/tasks/redhat.yml
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions playbooks/tasks/suse.yml
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion roles/locales
2 changes: 1 addition & 1 deletion roles/python
2 changes: 1 addition & 1 deletion roles/sshd
2 changes: 1 addition & 1 deletion roles/timezone

0 comments on commit 13204bf

Please sign in to comment.