Hi all,
I'm very new to ansible and sorry if the question is too easy
I have defined host_var
locked_domains:
And I want to append values to it from a task
- set_fact: locked_domains="{{ locked_domains + item.ID }}"
when: {{item.state}} == "some_cond"
with_items: "{{ domains.json }}"
where domains.json is an array of objects
I get the following error
fatal: [localhost] => Failed to template locked_domains="{{ locked_domains
+ item.ID }}": an unexpected type error occurred. Error was unsupported
operand type(s) for +: 'NoneType' and 'str'
FATAL: all hosts have already failed -- aborting
Please advise
Thanks
Elad
--
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/9551f192-a165-4537-9542-df8d82154e70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.