79180588

Date: 2024-11-12 10:00:41
Score: 1.5
Natty:
Report link

The desired behavior could be achieved with this playbook:

- name: install-vmtest
  hosts: test_nodes
  tasks:
    - name: Run test role with first set of vars
      ansible.builtin.import_role:
        name: test
        vars_from: variables1.yml
    - name: Run test role with second set of vars
      ansible.builtin.import_role:
        name: test
        vars_from: variables2.yml

Variable files must be located under the role’s vars/ directory.

Source https://docs.ansible.com/ansible/latest/collections/ansible/builtin/import_role_module.html

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: akire0ne