I’ve tried that way, but it doesn’t work either: nsible-playbook -i hosts --extra-vars "wc2env=stage carrier=LL" alta_carrier/playbook/tasks_targe t.yaml
PLAYBOOK: tasks_target.yaml ************************************************************************************************************************ Positional arguments: alta_carrier/playbook/tasks_target.yaml verbosity: 5 connection: smart timeout: 10 become_method: sudo tags: ('all',) inventory: ('/etc/ansible/webcheckin/hosts',) extra_vars: ('wc2env=stage carrier=XX',) forks: 50 step: True 4 plays in alta_carrier/playbook/tasks_target.yaml TASK [Creating DataBase] *************************************************************************************************************************** task path: /etc/ansible/webcheckin/alta_carrier/playbook/add_carrier_prod.yaml:6 skipping: [wc2-stage] => { "changed": false, "skip_reason": "Conditional result was False" } Here the playbook: - name: "select target" hosts: all gather_facts: no tasks: - name: "deploy prod" ansible.builtin.import_playbook: add_carrier_prod.yaml when: wc2env == 'prod' - name: "deploy stage" ansible.builtin.import_playbook: add_carrier_stage.yaml when: wc2env == 'stage' any sugestions? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAGUDtnmFjQJEhgbj_iae392139qeKz4SnRTaBOa3ne5x5PaXWA%40mail.gmail.com.