Skip to content

Instantly share code, notes, and snippets.

@hgrimelid
Last active December 14, 2017 13:59
Show Gist options
  • Save hgrimelid/9085a2f1965279e5257e261d8d65434b to your computer and use it in GitHub Desktop.
Save hgrimelid/9085a2f1965279e5257e261d8d65434b to your computer and use it in GitHub Desktop.
Ansible notes
# Ansible inventory syntax example with ssh username and port number
[group]
servername_or_ip ansible_user=USERNAME ansible_port=PORT
# Run playbook for
# - group in hosts file
# - extra vars
# - step through tasks
ansible-playbook -i HOSTS_FILE -l HOSTS_GROUP --extra-vars "VAR_1=VALUE_1 VAR_2=VALUE_2" --step
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment