Created
November 10, 2017 19:44
-
-
Save dustinrue/3d4f18853a3288be99ed2754644387a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Disable SE Linux | |
selinux: | |
state: disabled | |
register: selinux | |
tags: | |
- selinux | |
- block: | |
- name: Restart and wait on server if selinux changed | |
shell: sleep 2 && shutdown -r now "Ansible package updates triggered" | |
async: 1 | |
poll: 0 | |
ignore_errors: true | |
- name: Wait on server to return | |
local_action: | |
module: wait_for | |
host={{ ansible_ssh_host }} | |
port={{ ansible_ssh_port | default('22') }} | |
delay=60 | |
timeout=300 | |
become: false | |
when: selinux.changed | |
tags: | |
- selinux |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment