Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dustinrue
Created November 10, 2017 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustinrue/3d4f18853a3288be99ed2754644387a1 to your computer and use it in GitHub Desktop.
Save dustinrue/3d4f18853a3288be99ed2754644387a1 to your computer and use it in GitHub Desktop.
- 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