Does anyone know why the below syntax is commenting same output repeating 
twice in Jira comment section . 


 - local_action: lineinfile line="CIMC IP is {{ inventory_hostname.split() 
| list | to_yaml }} {{ user | rejectattr('accountStatus', 'eq', 
'inactive')| list | to_yaml }}" dest=/tmp/user.txt create=yes              
                                                                 
  - name: Comment on issue
    jira:
      uri: 'XXXXX'
      username: 'XXXXX'
      password: 'XXXX'
      issue: 'XXXX'
      operation: comment
      comment: "{{ lookup('file', '/tmp/user.txt') }}"

On Tuesday, 19 January 2021 at 16:42:42 UTC-5 Ramesh AR wrote:

> Hello all,
>
> The below is the debug output and host1 is 1st comment and host 2 is 2nd 
> comment so on .. how to combine these two debug o/p and comment into one 
> section. 
>
> ++++++++++++++++ debug output ++++++++++++++++++
> ok: [host1] => {}
>
> MSG:
> - {accountStatus: active, id: '1', name: admin, priv: admin}
>
> ok: [host2] => {}
>
> MSG:
> - {accountStatus: active, id: '1', name: admin, priv: admin}
> +++++++++++++++++++++++++++++++++++++++++++++++
>
> Playbook:
>
>  - name: Comment on issue
>     jira:
>       uri: 'XXXXX'
>       username: 'XXXXX'
>       password: 'XXXXX'
>       issue: 'XXXXX'
>       operation: comment
>       comment: IP is "{{ inventory_hostname.split() | list | to_yaml }} {{ 
> user | rejectattr('accountStatus', 'eq', 'inactive')| list | to_yaml }}"
>     delegate_to: localhost
>
> Thanks,
> Ramesh 
>
>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/cd56677d-0a03-4df5-b95d-6884b2b7cc03n%40googlegroups.com.

Reply via email to