mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-02-03 23:51:48 +00:00
respawn firewalld module when selinux is missing
This commit is contained in:
parent
34a9cf3e4d
commit
ad414c87b4
3 changed files with 5 additions and 7 deletions
|
|
@ -10,11 +10,6 @@
|
|||
state: present
|
||||
# This doesn't work for CentOS 6 because firewalld doesn't exist in CentOS6
|
||||
|
||||
- name: Check to make sure the firewalld python module is available.
|
||||
shell: "{{ansible_python.executable}} -c 'import firewall'"
|
||||
register: check_output
|
||||
ignore_errors: true
|
||||
|
||||
- name: Enable dbus-broker daemon
|
||||
service:
|
||||
name: dbus-broker
|
||||
|
|
@ -30,7 +25,6 @@
|
|||
state: started
|
||||
|
||||
- import_tasks: run_all_tests.yml
|
||||
when: check_output.rc == 0
|
||||
|
||||
- name: Test Offline Operations
|
||||
block:
|
||||
|
|
@ -40,7 +34,6 @@
|
|||
state: stopped
|
||||
|
||||
- import_tasks: run_all_tests.yml
|
||||
when: check_output.rc == 0
|
||||
|
||||
when:
|
||||
- ansible_facts.os_family == "RedHat" and ansible_facts.distribution_major_version is version('7', '>=')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue