Skip to content

Instantly share code, notes, and snippets.

@benschweizer
Created July 14, 2020 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benschweizer/7bc8ef3f9598e6ae238cbe3f93bed160 to your computer and use it in GitHub Desktop.
Save benschweizer/7bc8ef3f9598e6ae238cbe3f93bed160 to your computer and use it in GitHub Desktop.
ansible roles from inventory vars
---
- hosts: site
become: yes
gather_facts: no
tasks:
- name: Running role {{ role }}
include_role:
name: "{{ role }}"
loop: "{{ roles_to_apply }}"
loop_control:
loop_var: role
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment