Skip to content

Instantly share code, notes, and snippets.

@unbelauscht
Created March 2, 2022 08:49
Show Gist options
  • Save unbelauscht/c9fae99b9e77e96ac1f12b8f7d5d068b to your computer and use it in GitHub Desktop.
Save unbelauscht/c9fae99b9e77e96ac1f12b8f7d5d068b to your computer and use it in GitHub Desktop.
Ansible commands
# restart icinga2 service on all hosts
ansible -i hosts.live.yml all -b -m service -a "name=nginx state=restarted"
# check if host is reachable from Ansible hosts
ansible -i hosts.live.yml all -m wait_for -a "host=google.com port=443"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment