Skip to content

Instantly share code, notes, and snippets.

@agaffney
Last active November 18, 2019 15:07
Show Gist options
  • Save agaffney/fda5fa19d00ae79b02357a799a0b14ee to your computer and use it in GitHub Desktop.
Save agaffney/fda5fa19d00ae79b02357a799a0b14ee to your computer and use it in GitHub Desktop.
Example of installing a role from Galaxy and using it in the same play
- hosts: localhost
gather_facts: no
vars:
test_role: grog.debug-variable
tasks:
- command: ansible-galaxy install -p {{ playbook_dir }}/roles {{ test_role }}
- include_role:
name: '{{ test_role }}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment