Skip to content

Instantly share code, notes, and snippets.

@constrict0r
Last active October 25, 2019 13:55
Show Gist options
  • Save constrict0r/21089c5fcaeb9528b337d022cac42195 to your computer and use it in GitHub Desktop.
Save constrict0r/21089c5fcaeb9528b337d022cac42195 to your computer and use it in GitHub Desktop.
Run ansible role via ssh.
ansible my_pattern -i inventory -m ping -e "ansible_user=debian ansible_ssh_pass=debian"
ansible my_pattern -i inventory -m include_role -a name=constrict0r.task -e "{ansible_user: username, ansible_ssh_pass: 1234, ansible_become_pass: 1234, users: username, user_tasks: ['https://is.gd/uE0TTp']}"
# Inventory:
# [my_pattern]
# 192.168.100.196
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment