diff --git a/test_includes.yml b/test_includes.yml index 53fbe30..bc382fa 100644 --- a/test_includes.yml +++ b/test_includes.yml @@ -11,6 +11,7 @@ # loop_var: install_product vars: + host_match: lab-dev-1 install_products: - inc1 - inc2 @@ -20,10 +21,17 @@ tasks: - - name: Debug upgrade + - name: Debug y0 ansible.builtin.debug: msg: "y0" + + - name: Loop vars if host match + when: host_match in inventory_hostname + ansible.builtin.debug: + msg: "{{ item }}" + loop: "{{ install_products }}" + # - name: Includes on loop # ansible.builtin.include_tasks: "includes/{{ item }}.yml" # loop: "{{ install_products }}"