Artificial intelligent assistant

ansible run list of roles with loop I have main file, that can initiate different individual roles. --- - hosts: all gather_facts: False roles: - role: "{{ rnames }}" ... when I run individual roles, it runs fine ansible-playbook -i inv initiate.yml -e rnames=install_packages But what I prefer is to run multiple roles, by providing a list of roles to `rname` variable ansible-playbook -i inv initiate.yml -e rnames=install_packages,config_merge I tried `with_items` & `loop` constructs, but can't seem to figure out.

Use include roles in a loop. For example, you'll have to split the comma-separated list of roles


tasks:
- include_role:
name: "{{ item }}"
loop: "{{ rnames.split(',') }}"

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 189f37f52d9b91f7f28840d9601d6998