Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible: allow running playbook in check mode #2682

Merged
merged 1 commit into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ansible/roles/bootstrap/tasks/partials/centos.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- name: check for firewalld
raw: stat /usr/sbin/firewalld
check_mode: no
register: has_firewalld
failed_when: has_firewalld.rc > 1

Expand Down
2 changes: 2 additions & 0 deletions ansible/roles/bootstrap/tasks/partials/centos6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@

- name: check for python
raw: stat /usr/bin/python
check_mode: no
register: has_python
failed_when: has_python.rc > 1

- name: check for libselinux-python bindings
raw: yum info libselinux-python | grep Installed
check_mode: no
register: has_libselinux
failed_when: has_libselinux.rc > 1

Expand Down
1 change: 1 addition & 0 deletions ansible/roles/bootstrap/tasks/partials/debian9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- name: check for apt-transport-https
raw: stat /usr/lib/apt/methods/https
check_mode: no
register: has_apt_transport
failed_when: has_apt_transport.rc > 1

Expand Down
3 changes: 3 additions & 0 deletions ansible/roles/bootstrap/tasks/partials/fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

- name: check for python
raw: stat /usr/bin/python2
check_mode: no
register: has_python
failed_when: has_python.rc > 1

Expand All @@ -22,6 +23,7 @@

- name: check for {{ 'libselinux-python' if os in ("fedora30") else 'python3-libselinux' }} bindings
raw: dnf info {{ 'libselinux-python' if os in ("fedora30") else 'python3-libselinux' }} | grep Installed
check_mode: no
register: has_libselinux
failed_when: has_libselinux.rc > 1

Expand All @@ -40,6 +42,7 @@

- name: check for firewalld
raw: stat /usr/sbin/firewalld
check_mode: no
register: has_firewalld
failed_when: has_firewalld.rc > 1

Expand Down
1 change: 1 addition & 0 deletions ansible/roles/bootstrap/tasks/partials/freebsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- name: check for python
raw: stat /usr/local/bin/python
check_mode: no
register: has_python
failed_when: has_python.rc > 1

Expand Down
2 changes: 2 additions & 0 deletions ansible/roles/bootstrap/tasks/partials/ubuntu1604.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@

- name: check for python
raw: stat /usr/bin/python
check_mode: no
failed_when: has_python.rc > 1
register: has_python

- name: check for aptitude
raw: stat /usr/bin/aptitude
check_mode: no
failed_when: has_aptitude.rc > 1
register: has_aptitude

Expand Down
2 changes: 2 additions & 0 deletions ansible/roles/bootstrap/tasks/partials/ubuntu1804.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@

- name: check for python
raw: stat /usr/bin/python
check_mode: no
failed_when: has_python.rc > 1
register: has_python

- name: check for aptitude
raw: stat /usr/bin/aptitude
check_mode: no
failed_when: has_aptitude.rc > 1
register: has_aptitude

Expand Down
1 change: 1 addition & 0 deletions ansible/roles/bootstrap/tasks/partials/zos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@

- name: check for python
shell: "python --version"
check_mode: no
register: has_python
failed_when: has_python.rc > 1
1 change: 1 addition & 0 deletions ansible/roles/java-base/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

- name: Check if java is already installed
raw: java -version
check_mode: no
register: java
ignore_errors: yes

Expand Down