Created
June 29, 2021 13:20
-
-
Save cfra/c4190ad73d7966350344d3b308859f81 to your computer and use it in GitHub Desktop.
Ansible: Use async task to work around unreachable Host while reloading networking configuration
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: Reload networking (in-band) | |
service: | |
name: networking | |
state: reloaded | |
- name: Reload networking (out-of-band) | |
shell: ifreload --allow=mgmt | |
async: 45 | |
poll: 0 | |
- name: Wait for out-of-band network to start reload | |
pause: | |
seconds: 2 | |
- name: Wait for out-of-band network to finish reload | |
wait_for_connection: | |
timeout: 30 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment