Hi,
The error says all:
"[WARNING]: conditional statements should not include jinja2 templating
delimiters such as {{ }}"
So, your "when" statement should look like:
when: wc2env == 'stage'
Something else:
You are already passing on "wc2env" as an extra variable. You don't need
the lines below,
Alex pointed out your first mistake, but you also are using moustaches in
'when' when you shouldn't
when: wc2env == 'prod'
conditionals are already in an implied template context.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscr
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
***
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
This is the entire output:
ansible-playbook [core 2.12.9]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/emanuel/.ansible/plugins/modules',
'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible coll
You still haven't shown us a task with the name "Creating DataBase", which
is what's being skipped. Until you show us the tasks and their conditionals
that go with the outputs, we can only guess.
On Wednesday, February 8, 2023 at 7:57:22 AM UTC-5 ema...@gmail.com wrote:
> This is the entire out
task path: /etc/ansible/webcheckin/alta_carrier/playbook/add_carrier_prod.yaml:6
skipping: [wc2-stage] => {
"changed": false,
"skip_reason": "Conditional result was False"
}
Look at the red text above. You have a prod task file. Your wc2env variable has
a value of 'stage'. Your task in the
Read this article for a more thorough explanation of import vs include and how
conditions on them are handled.
https://www.devopsschool.com/blog/ansible-include-and-import-with-differences-explanined/
Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123
On Fe