Can not figure out what is going on here:
tasks:
- jenkins_job: uri={{jenkins_uri}}
username={{jusername}}
password={{jpassword}}
name="{{branch}}_{{item[0]}}_{{item[1].dut |
regex_replace('-\d+$', '') }}"
config="branch_TEST_TYPE_platform.xml"
args:
config_params:
templates_base_dir: "{{templates_base_dir}}"
repo: "{{repo}}"
branch: "{{branch}}"
test_branch: "{{branch}}"
test_type: "{{item[0]}}"
test_dut: "{{item[1].dut}}"
test_build_label: "{{ item[1].build_label | default( lookup('hydra',
item[1].dut) ) }}"
with_nested:
- "{{phases}}"
- "{{duts}}"
The above code sets the value for 'test_build_labe;' to "", but this code
vars:
- dut: abc-123-xyz
- hydra: "{{ test | default( lookup('hydra', dut) ) }}"
tasks:
- debug: msg="DUT {{dut}} has HYDRA {{hydra}}"
Works perfectly fine.
I am sure I missed a quote or something silly like that - does anybody have
any experience with lookup inside a default and could spot a problem?
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/2b9fa94d-0666-429e-87da-e6ebb8d38710%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.