You only posted a single task.
Please post your entire playbook.
Also explain what your command should look like (it’s not clear what you
posted is correct or not).
On Sat, 15 Feb 2020 at 20:57, sandkan wrote:
> Playbook is running task on wrong node: I have two nodes and this task has
> to run
Try just using {{ ansible_hostname }} it should give you the details you
want.
On Sun, 16 Feb 2020, 06:57 sandkan, wrote:
> Playbook is running task on wrong node: I have two nodes and this task has
> to run on a specific one and not the other, as well as only running once.
> I have tried adding
Playbook is running task on wrong node: I have two nodes and this task has
to run on a specific one and not the other, as well as only running once.
I have tried adding a sort() like this: {{ansible_play_batch | join(' ') |
sort()}}.
I'm not even sure why I need to add spaces after ansible_play_b
On 2/15/20 6:44 PM, Seth Daemen wrote:
> I already tried {{ hostUUid[0] }} gives also not the result I want.
> that gives this in the debug:
>
It is indeed a dict within a list, so please try hostUUid[0].id
Regards
Racke
> |
> ok:[localhost]=>{
> "msg":[
> "list",
>
solved my issue.
{{ hostUUid[0] }}
is working. But I had to set:
body_format: json
in my uri
Op zaterdag 15 februari 2020 18:44:04 UTC+1 schreef Seth Daemen:
>
> I already tried {{ hostUUid[0] }} gives also not the result I want.
> that gives this in the debug:
>
> ok: [localhost] => {
>
I already tried {{ hostUUid[0] }} gives also not the result I want.
that gives this in the debug:
ok: [localhost] => {
"msg": [
"list",
{
"id": "7261c5626862-abafe49d9bac"
}
]
}
the body now look like this:
"body": "{\"environmentUuid\": \"7261c562686
On 2/15/20 5:22 PM, Seth Daemen wrote:
>
> I have a fact hostUUid when I display it with the following debug command
>
> |
> -name:debug uuid
> debug:
> msg:
> -"{{ hostUUid | type_debug }}"
> -"{{ hostUUid }}"
> |
>
>
>
>
> I get the following result:
>
> |
I have a fact hostUUid when I display it with the following debug command
- name: debug uuid
debug:
msg:
- "{{ hostUUid | type_debug }}"
- "{{ hostUUid }}"
I get the following result:
ok: [localhost] => {
"msg": [
"list",
"[{u'id': u'7
On Sat, 15 Feb 2020 00:16:02 -0800 (PST)
Eric Chang wrote:
> so any suggesions to combine multiple yaml files with same attributes ?
Sure. For example
- set_fact:
users: "{{ users|
default({})|
combine({my_key: my_value}) }}"
vars:
so any suggesions to combine multiple yaml files with same attributes ?
--
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...@googlegrou
10 matches
Mail list logo