Skip to content

Commit

Permalink
https://github.com/ansible/ansible-lint/pull/2527
Browse files Browse the repository at this point in the history
  • Loading branch information
hswong3i committed Oct 2, 2022
1 parent f272f6d commit 45eb7ce
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 38 deletions.
7 changes: 4 additions & 3 deletions molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
become: true
tasks:
- name: docker-entrypoint.sh
ansible.builtin.shell: |
set -euxo pipefail
/usr/local/bin/docker-entrypoint.sh /usr/sbin/sshd -eD
ansible.builtin.shell:
cmd: |
set -euxo pipefail
/usr/local/bin/docker-entrypoint.sh /usr/sbin/sshd -eD
args:
executable: "/bin/bash"
async: 300
Expand Down
53 changes: 29 additions & 24 deletions playbooks/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,54 +22,59 @@
ignore_unreachable: true
tasks:
- name: rm -rf /var/cache/ansible/*
ansible.builtin.raw: |
set -eu
rm -rf /var/cache/ansible/*
rm -rf /root/.cache/*
rm -rf /tmp/*
ansible.builtin.raw:
cmd: |
set -eu
rm -rf /var/cache/ansible/*
rm -rf /root/.cache/*
rm -rf /tmp/*
args:
executable: "/bin/bash"
changed_when: false
failed_when: false

- name: debian | apt-get -y clean
ansible.builtin.raw: |
set -eu
apt-get -y autoremove
apt-get -y autoclean
apt-get -y clean
rm -rf /var/lib/apt/lists/*
ansible.builtin.raw:
cmd: |
set -eu
apt-get -y autoremove
apt-get -y autoclean
apt-get -y clean
rm -rf /var/lib/apt/lists/*
args:
executable: "/bin/bash"
changed_when: false
failed_when: false

- name: redhat | yum clean all
ansible.builtin.raw: |
set -eu
yum clean all
rm -rf /var/cache/yum/*
ansible.builtin.raw:
cmd: |
set -eu
yum clean all
rm -rf /var/cache/yum/*
args:
executable: "/bin/bash"
changed_when: false
failed_when: false

- name: suse | zypper clean --all
ansible.builtin.raw: |
set -eu
zypper clean --all
rm -rf /var/cache/zypper/*
ansible.builtin.raw:
cmd: |
set -eu
zypper clean --all
rm -rf /var/cache/zypper/*
args:
executable: "/bin/bash"
changed_when: false
failed_when: false

- name: redhat | subscription-manager unregister
ansible.builtin.raw: |
set -eu
subscription-manager remove --all
subscription-manager unregister
subscription-manager clean
ansible.builtin.raw:
cmd: |
set -eu
subscription-manager remove --all
subscription-manager unregister
subscription-manager clean
args:
executable: "/bin/bash"
changed_when: false
Expand Down
3 changes: 2 additions & 1 deletion playbooks/tasks/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
failed_when: false

- name: yum-config-manager --enable
ansible.builtin.command: yum-config-manager --{{ item.state }} {{ item.name }}
ansible.builtin.command:
cmd: yum-config-manager --{{ item.state }} {{ item.name }}
loop: "{{ _yum_config_manager }}"
changed_when: false
failed_when: false
Expand Down
7 changes: 4 additions & 3 deletions playbooks/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@
skip: true

- name: ssh-keygen
ansible.builtin.shell: |
set -euxo pipefail
ssh-keygen -A
ansible.builtin.shell:
cmd: |
set -euxo pipefail
ssh-keygen -A
args:
executable: "/bin/bash"
changed_when: false
Expand Down
2 changes: 1 addition & 1 deletion roles/ansible
2 changes: 1 addition & 1 deletion roles/catatonit
2 changes: 1 addition & 1 deletion roles/gosu
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 45eb7ce

Please sign in to comment.