We need to see the entire output. This excerpt does not provide enough context. 
From what I see it is skipping the PROD because your wc2end is 'stage'. That is 
expected.

Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123

On Feb 7, 2023, at 7:55 PM, SysAdmin EM <[email protected]> wrote:

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 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAGUDtnmFjQJEhgbj_iae392139qeKz4SnRTaBOa3ne5x5PaXWA%40mail.gmail.com<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2FCAGUDtnmFjQJEhgbj_iae392139qeKz4SnRTaBOa3ne5x5PaXWA%2540mail.gmail.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7C6cc7e4eab97442bdd09408db096f4c81%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638114145865724934%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=EQVq3oFG%2B8Hz4CeWWwXov%2FahAfl4%2BTK3bzs%2B1QVFnMY%3D&reserved=0>.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/08B7D983-0FC8-4C45-96C2-F423AE3626A3%40nist.gov.

Reply via email to