Re: [ansible-project] ssh management ansible

2021-10-22 Thread Alex Wanderley
Hi,

"with_key:" should actually be "with_items"

Alex


On Fri, Oct 22, 2021 at 4:49 PM Ndricim Danaj 
wrote:

> TASK [Set up multiple authorized ssh]
> **
> fatal: [web1]: FAILED! => {"msg": "The task includes an option with an
> undefined variable. The error was: 'item' is undefined\n\nThe error appears
> to be in '/home/ndricim/playbooks/00.yml': line 5, column 9, but may\nbe
> elsewhere in the file depending on the exact syntax problem.\n\nThe
> offending line appears to be:\n\n  tasks:\n
>
> ---
> - name: Set SSH Key
>   hosts: web1
>   tasks:
>   - name: Set up multiple authorized ssh
> authorized_key:
>   user: work
>   state: present
>   key: '{{ item }}'
>   with_key:
>-  /home/ndricim/test/id_rsa2.pub
>-  /home/ndricim/test/id_rsa3.pub
>
> --
> 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/09e4f6f5-0cde-4828-a82f-d2d618ad29d0n%40googlegroups.com
> 
> .
>


-- 



[image: Edmonton_sig_RGB_S.jpg]

Alex Wanderley

Application and Infrastructure Analyst II
Acting Team Lead Storage and Backup Solutions

Financial and Corporate Services | Open City and Technology



780-496-4156  Office

780-819-0273  Mobile



City of Edmonton

Century Place, 12th Floor

9803 102A Avenue NW

Edmonton AB, T5J 3A3



All information contained in this email post is proprietary to the City of
Edmonton, confidential and intended only for the addressed recipient. If
you have received this post in error, please disregard the contents, inform
the sender of the misdirection, and remove it from your system. The
copying, dissemination or distribution of this email, if misdirected, is
strictly prohibited.

-- 
*The contents of this message and any attachment(s) are confidential, 
proprietary to the City of Edmonton, and are intended only for the 
addressed recipient. If you have received this in error, please disregard 
the contents, inform the sender of the misdirection, and remove it from 
your system. The copying, dissemination, or distribution of this message, 
if misdirected, is strictly prohibited.*

-- 
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/CADp8UUT%2B%2BsKQtu91z4Zu3YXV7sJpqWqv5Yis%3DnxPdw%2BajaGUsA%40mail.gmail.com.


[ansible-project] ssh management ansible

2021-10-22 Thread Ndricim Danaj
TASK [Set up multiple authorized ssh] 
**
fatal: [web1]: FAILED! => {"msg": "The task includes an option with an 
undefined variable. The error was: 'item' is undefined\n\nThe error appears 
to be in '/home/ndricim/playbooks/00.yml': line 5, column 9, but may\nbe 
elsewhere in the file depending on the exact syntax problem.\n\nThe 
offending line appears to be:\n\n  tasks:\n 

--- 
- name: Set SSH Key
  hosts: web1
  tasks:
  - name: Set up multiple authorized ssh
authorized_key:
  user: work
  state: present
  key: '{{ item }}'
  with_key:
   -  /home/ndricim/test/id_rsa2.pub
   -  /home/ndricim/test/id_rsa3.pub

-- 
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/09e4f6f5-0cde-4828-a82f-d2d618ad29d0n%40googlegroups.com.


[ansible-project] Re: kerberos: Bad HTTP response returned from server. Code 500

2021-10-22 Thread Tim Stauffer
I ran into this.  Upgrading the python modules *pykerberos* and *pywinrm* 
fixed it for me.

On Wednesday, September 29, 2021 at 6:26:23 AM UTC-7 gajendra@gmail.com 
wrote:

> Good evening All
>
> I am facing a small issue, could you please let me out
>
> This works if i allow unencrypted is true : Set-Item -Path 
> WSMan:\localhost\Service\AllowUnencrypted -Value true
>
> * Error: fatal: [win-client-01.adc1.com ]: 
> UNREACHABLE! => {"changed": false, "msg": "kerberos: Bad HTTP response 
> returned from server. Code 500", "unreachable": true}*
>
> Note: I have not done any configuration on windows host node( default 
> winrm service is running and firewall is disabled)
>
> 
> yaml file:
> =
> ---
> - name: TEst ping
>   hosts: all
>   vars:
> ansible_user: terrafo...@adc1.com
> ansible_password: **
> ansible_connection: winrm
> ansible_port: 5985
> ansible_winrm_transport: kerberos
> ansible_winrm_server_cert_validation: ignore
> ansible_winrm_kerberos_delegation: true
>   tasks:
>   - name: winping
> win_ping:
> register: out
> =
> kinit 
> ===
> ansible@ansible1:~$ kinit terrafo...@adc1.com
> Password for terrafo...@adc1.com:
> ansible@ansible1:~$ klist
> Ticket cache: FILE:/tmp/krb5cc_1000
> Default principal: terrafo...@adc1.com
>
> Valid starting ExpiresService principal
> 09/29/21 12:52:55  09/29/21 22:52:55  krbtgt/adc1...@adc1.com
> renew until 10/06/21 12:52:50
>
> =
> winrs-ouput
> 
> C:\Users\systemadmin>winrs -r:http://127.0.0.1:5985/wsman -
> u:terrafor...@adc1.com -p:** ipconfig
>
> Windows IP Configuration
>
>
> Ethernet adapter Ethernet 2:
>
>Connection-specific DNS Suffix  . : 
> jbtpdu1g0fpeddh5infylu3bjckbaug.gx.internal.cloudapp.net
>Link-local IPv6 Address . . . . . : fe80::f8d7:1f58:8810:2e2f%5
>IPv4 Address. . . . . . . . . . . : 172.16.0.7
>Subnet Mask . . . . . . . . . . . : 255.255.255.0
>Default Gateway . . . . . . . . . : 172.16.0.1
>
> ===
> krb5-conf
>
> 
> [logging]
>  default = FILE:/var/log/krb5libs.log
>  kdc = FILE:/var/log/krb5kdc.log
>  admin_server = FILE:/var/log/kadmind.log
>
> [libdefaults]
>  default_realm = ADC1.COM 
>  allow_weak_crypto = true
>  dns_lookup_realm = false
>  dns_lookup_kdc = false
>  rdns = false
>  ticket_lifetime = 24h
>  renew_lifetime = 7d
>  forwardable = true
>
> [realms]
>  ADC1.COM  = {
>kdc = testadc.adc1.com
>admin_server = testadc.adc1.com
>  }
>
> ==
> packages 
> 
> ansible@ansible1:~$ pip list | grep kerb
> pykerberos1.1.14
> requests-kerberos 0.12.0
> ansible@ansible1:~$ pip list | grep ansible
> ansible   4.6.0
> ansible-core  2.11.5
> ansible@ansible1:~$
> =
>

-- 
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/cbde19e9-7fe5-4ba0-8c26-a0e521e0f3c3n%40googlegroups.com.


Re: [ansible-project] Want to add hidden password for url

2021-10-22 Thread Paulo Silva
Maybe vault os what you need:

https://docs.ansible.com/ansible/latest/user_guide/vault.html

A sexta, 22/10/2021, 10:50, vaishnavi kakad 
escreveu:

> Hi All,
>
> How we can add the hidden password in Ansible ?
>
> For eg :
> - name: Download image files
>   get_url:
> url: http://0.0.0.0/XYZ.tar.gz
> url_username:XYZ
> *url_password: * *  (I want to add hidden password here. )
>
> Can you please let me know if you have any idea .
>
> Thanks,
> Vaishnavi
>
> --
> 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/12c7cb66-c96d-445c-bf07-57c47fabc049n%40googlegroups.com
> 
> .
>

-- 
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/CAHJdQr%3D5gRePVHuq09%3DO-Q9VGW9kqV%3D5ept-n2nu6zWGaourQw%40mail.gmail.com.


Re: [ansible-project] one email for multiple hosts

2021-10-22 Thread Dick Visser
I think run_once only works when in a playbook task. Not when it's buried
inside a role

On Fri, 22 Oct 2021 at 19:56, Raja Natte  wrote:

> Yes
>
> On Fri, Oct 22, 2021, 1:55 PM Dick Visser  wrote:
>
>> So this mail task is part of that role?
>>
>>
>> On Fri, 22 Oct 2021 at 16:09, Raj  wrote:
>>
>>> Hi, VGM
>>>
>>> my playbook call roles  ssl scan  ( final part is email to send once)
>>> but it is sending 100 emails
>>>
>>> ---
>>> - hosts: "{{ web }}"
>>>   gather_facts: yes
>>>   roles:
>>> - SSL_scan
>>>
>>> On Thursday, October 14, 2021 at 11:09:29 AM UTC-4 dick@geant.org
>>> wrote:
>>>
 So, post that playbook

 On Thu, 14 Oct 2021 at 17:03, Raja Natte  wrote:

> Hi..
>
>
> Yes it is running in same playbook.
>
> On Thu, Oct 14, 2021, 10:21 AM Dick Visser  wrote:
>
 This is just the one mail task.
>> It must be part of a playbook, where other things happen as well, and
>> which will reveal the cause.
>>
>> Also, you say "I am trying to send one email to team after job is
>> successfully completed".
>> I guess this "job" is the running of the playbook?
>>
>>
>>
>>
>> On Thu, 14 Oct 2021 at 15:12, Raj  wrote:
>>
>
>>> Hi Racke,
>>>
>>> This is my code
>>>
>>> - name: Sending email to about SSL scan
>>>   mail:
>>> host: x
>>> port: 25
>>> subject: 
>>> body:  
>>> from: xxx
>>> to:
>>># - 
>>> - 
>>>   delegate_to: localhost
>>>   run_once: true
>>> On Thursday, October 14, 2021 at 1:28:05 AM UTC-4 ra...@linuxia.de
>>> wrote:
>>>
 On 13/10/2021 22:13, Raj wrote:
 > Hi All,
 >
 > I am trying to send one email to team after job is successfully
 completed.  Issue is playbook sending (if inventory have 100 servers 
 ). It
 is sending 100 emails.
 >
 > I tried in my code:  delegate_to: localhost and run_once: true it
 doesn't help please provide your inputs it really helpful .

 That should work. Please provide your code.

 Regards

Racke

 >
 > TIA
 > Raja
 > --
 > 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-proje...@googlegroups.com >>> ansible-proje...@googlegroups.com>.
 > To view this discussion on the web visit
 https://groups.google.com/d/msgid/ansible-project/b69b5eb1-7de3-4bce-80fd-2ca824fd07a0n%40googlegroups.com
 <
 https://groups.google.com/d/msgid/ansible-project/b69b5eb1-7de3-4bce-80fd-2ca824fd07a0n%40googlegroups.com?utm_medium=email_source=footer>.



 --
 Ecommerce and Linux consulting + Perl and web application
 programming.
 Debian and Sympa administration.

 --
>>> 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-proje...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/f662886f-2a63-4988-a2b7-e15a4dfbfd16n%40googlegroups.com
>>> 
>>> .
>>>
>>
>>
>> --
>> Dick Visser
>> Trust & Identity Service Operations Manager
>> GÉANT
>>
>> --
>> 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-proje...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CAL8fbwNz4ToNKCBngPbHOtB4%3D%3DHbFvx%3DTCJ6%3D4CL-kSrgvrDUA%40mail.gmail.com
>> 
>> .
>>
> --
> 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-proje...@googlegroups.com.
>
 To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CA%2BuTAOgXB1y_ATqNWBtRXxNyVuysaVA8gBp3Scx8cJKFAR-nBA%40mail.gmail.com
> 

Re: [ansible-project] one email for multiple hosts

2021-10-22 Thread Raja Natte
Yes

On Fri, Oct 22, 2021, 1:55 PM Dick Visser  wrote:

> So this mail task is part of that role?
>
>
> On Fri, 22 Oct 2021 at 16:09, Raj  wrote:
>
>> Hi, VGM
>>
>> my playbook call roles  ssl scan  ( final part is email to send once)
>> but it is sending 100 emails
>>
>> ---
>> - hosts: "{{ web }}"
>>   gather_facts: yes
>>   roles:
>> - SSL_scan
>>
>> On Thursday, October 14, 2021 at 11:09:29 AM UTC-4 dick@geant.org
>> wrote:
>>
>>> So, post that playbook
>>>
>>> On Thu, 14 Oct 2021 at 17:03, Raja Natte  wrote:
>>>
 Hi..


 Yes it is running in same playbook.

 On Thu, Oct 14, 2021, 10:21 AM Dick Visser  wrote:

>>> This is just the one mail task.
> It must be part of a playbook, where other things happen as well, and
> which will reveal the cause.
>
> Also, you say "I am trying to send one email to team after job is
> successfully completed".
> I guess this "job" is the running of the playbook?
>
>
>
>
> On Thu, 14 Oct 2021 at 15:12, Raj  wrote:
>

>> Hi Racke,
>>
>> This is my code
>>
>> - name: Sending email to about SSL scan
>>   mail:
>> host: x
>> port: 25
>> subject: 
>> body:  
>> from: xxx
>> to:
>># - 
>> - 
>>   delegate_to: localhost
>>   run_once: true
>> On Thursday, October 14, 2021 at 1:28:05 AM UTC-4 ra...@linuxia.de
>> wrote:
>>
>>> On 13/10/2021 22:13, Raj wrote:
>>> > Hi All,
>>> >
>>> > I am trying to send one email to team after job is successfully
>>> completed.  Issue is playbook sending (if inventory have 100 servers ). 
>>> It
>>> is sending 100 emails.
>>> >
>>> > I tried in my code:  delegate_to: localhost and run_once: true it
>>> doesn't help please provide your inputs it really helpful .
>>>
>>> That should work. Please provide your code.
>>>
>>> Regards
>>>
>>>Racke
>>>
>>> >
>>> > TIA
>>> > Raja
>>> > --
>>> > 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-proje...@googlegroups.com >> ansible-proje...@googlegroups.com>.
>>> > To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/b69b5eb1-7de3-4bce-80fd-2ca824fd07a0n%40googlegroups.com
>>> <
>>> https://groups.google.com/d/msgid/ansible-project/b69b5eb1-7de3-4bce-80fd-2ca824fd07a0n%40googlegroups.com?utm_medium=email_source=footer>.
>>>
>>>
>>>
>>> --
>>> Ecommerce and Linux consulting + Perl and web application
>>> programming.
>>> Debian and Sympa administration.
>>>
>>> --
>> 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-proje...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/f662886f-2a63-4988-a2b7-e15a4dfbfd16n%40googlegroups.com
>> 
>> .
>>
>
>
> --
> Dick Visser
> Trust & Identity Service Operations Manager
> GÉANT
>
> --
> 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-proje...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAL8fbwNz4ToNKCBngPbHOtB4%3D%3DHbFvx%3DTCJ6%3D4CL-kSrgvrDUA%40mail.gmail.com
> 
> .
>
 --
 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-proje...@googlegroups.com.

>>> To view this discussion on the web visit
 https://groups.google.com/d/msgid/ansible-project/CA%2BuTAOgXB1y_ATqNWBtRXxNyVuysaVA8gBp3Scx8cJKFAR-nBA%40mail.gmail.com
 
 .

>>>
>>>
>>> --
>>> Dick Visser
>>> Trust & Identity Service Operations Manager
>>> GÉANT
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ansible Project" group.
>> To unsubscribe from this 

Re: [ansible-project] one email for multiple hosts

2021-10-22 Thread Dick Visser
So this mail task is part of that role?


On Fri, 22 Oct 2021 at 16:09, Raj  wrote:

> Hi, VGM
>
> my playbook call roles  ssl scan  ( final part is email to send once)  but
> it is sending 100 emails
>
> ---
> - hosts: "{{ web }}"
>   gather_facts: yes
>   roles:
> - SSL_scan
>
> On Thursday, October 14, 2021 at 11:09:29 AM UTC-4 dick@geant.org
> wrote:
>
>> So, post that playbook
>>
>> On Thu, 14 Oct 2021 at 17:03, Raja Natte  wrote:
>>
>>> Hi..
>>>
>>>
>>> Yes it is running in same playbook.
>>>
>>> On Thu, Oct 14, 2021, 10:21 AM Dick Visser  wrote:
>>>
>> This is just the one mail task.
 It must be part of a playbook, where other things happen as well, and
 which will reveal the cause.

 Also, you say "I am trying to send one email to team after job is
 successfully completed".
 I guess this "job" is the running of the playbook?




 On Thu, 14 Oct 2021 at 15:12, Raj  wrote:

>>>
> Hi Racke,
>
> This is my code
>
> - name: Sending email to about SSL scan
>   mail:
> host: x
> port: 25
> subject: 
> body:  
> from: xxx
> to:
># - 
> - 
>   delegate_to: localhost
>   run_once: true
> On Thursday, October 14, 2021 at 1:28:05 AM UTC-4 ra...@linuxia.de
> wrote:
>
>> On 13/10/2021 22:13, Raj wrote:
>> > Hi All,
>> >
>> > I am trying to send one email to team after job is successfully
>> completed.  Issue is playbook sending (if inventory have 100 servers ). 
>> It
>> is sending 100 emails.
>> >
>> > I tried in my code:  delegate_to: localhost and run_once: true it
>> doesn't help please provide your inputs it really helpful .
>>
>> That should work. Please provide your code.
>>
>> Regards
>>
>>Racke
>>
>> >
>> > TIA
>> > Raja
>> > --
>> > 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-proje...@googlegroups.com > ansible-proje...@googlegroups.com>.
>> > To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/b69b5eb1-7de3-4bce-80fd-2ca824fd07a0n%40googlegroups.com
>> <
>> https://groups.google.com/d/msgid/ansible-project/b69b5eb1-7de3-4bce-80fd-2ca824fd07a0n%40googlegroups.com?utm_medium=email_source=footer>.
>>
>>
>>
>> --
>> Ecommerce and Linux consulting + Perl and web application
>> programming.
>> Debian and Sympa administration.
>>
>> --
> 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-proje...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/f662886f-2a63-4988-a2b7-e15a4dfbfd16n%40googlegroups.com
> 
> .
>


 --
 Dick Visser
 Trust & Identity Service Operations Manager
 GÉANT

 --
 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-proje...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/ansible-project/CAL8fbwNz4ToNKCBngPbHOtB4%3D%3DHbFvx%3DTCJ6%3D4CL-kSrgvrDUA%40mail.gmail.com
 
 .

>>> --
>>> 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-proje...@googlegroups.com.
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/CA%2BuTAOgXB1y_ATqNWBtRXxNyVuysaVA8gBp3Scx8cJKFAR-nBA%40mail.gmail.com
>>> 
>>> .
>>>
>>
>>
>> --
>> Dick Visser
>> Trust & Identity Service Operations Manager
>> GÉANT
>>
> --
> 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
> 

Re: [ansible-project] one email for multiple hosts

2021-10-22 Thread Raja Natte
Yes..

No errors email sending included run one and delegate_to localhost

Thanks

On Fri, Oct 22, 2021, 10:19 AM Stefan Hornburg (Racke) 
wrote:

> On 22/10/2021 16:09, Raj wrote:
> > Hi, VGM
> >
> > my playbook call roles  ssl scan  ( final part is email to send once)
> but it is sending 100 emails
>
> Did you ever check the indentation on your task sending email as advised?
>
> delegate_to should really work.
>
> Regards
>
>  Racke
>
> >
> > ---
> > - hosts: "{{ web }}"
> >   gather_facts: yes
> >   roles:
> > - SSL_scan
> >
> > On Thursday, October 14, 2021 at 11:09:29 AM UTC-4 dick@geant.org
> wrote:
> >
> > So, post that playbook
> >
> > On Thu, 14 Oct 2021 at 17:03, Raja Natte  wrote:
> >
> > Hi..
> >
> >
> > Yes it is running in same playbook.
> >
> > On Thu, Oct 14, 2021, 10:21 AM Dick Visser 
> wrote:
> >
> > This is just the one mail task.
> > It must be part of a playbook, where other things happen as
> well, and which will reveal the cause.
> >
> > Also, you say "I am trying to send one email to team after
> job is successfully completed".
> > I guess this "job" is the running of the playbook?
> >
> >
> >
> >
> > On Thu, 14 Oct 2021 at 15:12, Raj  wrote:
> >
> >
> > Hi Racke,
> >
> > This is my code
> >
> > - name: Sending email to about SSL scan
> >   mail:
> > host: x
> > port: 25
> > subject: 
> > body:  
> > from: xxx
> > to:
> ># - 
> > - 
> >   delegate_to: localhost
> >   run_once: true
> > On Thursday, October 14, 2021 at 1:28:05 AM UTC-4
> ra...@linuxia.de wrote:
> >
> > On 13/10/2021 22:13, Raj wrote:
> > > Hi All,
> > >
> > > I am trying to send one email to team after job is
> successfully completed.  Issue is playbook sending (if inventory have 100
> servers ). It is sending 100 emails.
> > >
> > > I tried in my code:  delegate_to: localhost and
> run_once: true it doesn't help please provide your inputs it really helpful
> .
> >
> > That should work. Please provide your code.
> >
> > Regards
> >
> >Racke
> >
> > >
> > > TIA
> > > Raja
> > > --
> > > 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-proje...@googlegroups.com
> .
> > > To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/b69b5eb1-7de3-4bce-80fd-2ca824fd07a0n%40googlegroups.com
> <
> https://groups.google.com/d/msgid/ansible-project/b69b5eb1-7de3-4bce-80fd-2ca824fd07a0n%40googlegroups.com>
> <
> https://groups.google.com/d/msgid/ansible-project/b69b5eb1-7de3-4bce-80fd-2ca824fd07a0n%40googlegroups.com?utm_medium=email_source=footer
> <
> https://groups.google.com/d/msgid/ansible-project/b69b5eb1-7de3-4bce-80fd-2ca824fd07a0n%40googlegroups.com?utm_medium=email_source=footer
> >>.
> >
> >
> > --
> > Ecommerce and Linux consulting + Perl and web
> application programming.
> > Debian and Sympa administration.
> >
> > --
> > 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-proje...@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/f662886f-2a63-4988-a2b7-e15a4dfbfd16n%40googlegroups.com
> <
> https://groups.google.com/d/msgid/ansible-project/f662886f-2a63-4988-a2b7-e15a4dfbfd16n%40googlegroups.com?utm_medium=email_source=footer
> >.
> >
> >
> >
> > --
> > Dick Visser
> > Trust & Identity Service Operations Manager
> > GÉANT
> > --
> > 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-proje...@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAL8fbwNz4ToNKCBngPbHOtB4%3D%3DHbFvx%3DTCJ6%3D4CL-kSrgvrDUA%40mail.gmail.com
> <
> 

Re: [ansible-project] Want to add hidden password for url

2021-10-22 Thread Jorge Rúa
Have you considered using secrets?

On Fri, Oct 22, 2021, 14:50 vaishnavi kakad 
wrote:

> Hi All,
>
> How we can add the hidden password in Ansible ?
>
> For eg :
> - name: Download image files
>   get_url:
> url: http://0.0.0.0/XYZ.tar.gz
> url_username:XYZ
> *url_password: * *  (I want to add hidden password here. )
>
> Can you please let me know if you have any idea .
>
> Thanks,
> Vaishnavi
>
> --
> 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/12c7cb66-c96d-445c-bf07-57c47fabc049n%40googlegroups.com
> 
> .
>

-- 
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/CAFtje5MZMKKFcEKj7yqT2VLQ5qtWX%2Bamr3cjyO%2Bha7pKBLh-%3DA%40mail.gmail.com.


Re: [ansible-project] one email for multiple hosts

2021-10-22 Thread Stefan Hornburg (Racke)

On 22/10/2021 16:09, Raj wrote:

Hi, VGM

my playbook call roles  ssl scan  ( final part is email to send once)  but it 
is sending 100 emails


Did you ever check the indentation on your task sending email as advised?

delegate_to should really work.

Regards

    Racke



---
- hosts: "{{ web }}"
  gather_facts: yes
  roles:
- SSL_scan

On Thursday, October 14, 2021 at 11:09:29 AM UTC-4 dick@geant.org wrote:

So, post that playbook

On Thu, 14 Oct 2021 at 17:03, Raja Natte  wrote:

Hi..


Yes it is running in same playbook.

On Thu, Oct 14, 2021, 10:21 AM Dick Visser  wrote:

This is just the one mail task.
It must be part of a playbook, where other things happen as well, 
and which will reveal the cause.

Also, you say "I am trying to send one email to team after job is 
successfully completed".
I guess this "job" is the running of the playbook?




On Thu, 14 Oct 2021 at 15:12, Raj  wrote:


Hi Racke,

This is my code

- name: Sending email to about SSL scan
  mail:
    host: x
    port: 25
    subject: 
    body:  
    from: xxx
    to:
   # - 
    - 
  delegate_to: localhost
  run_once: true
On Thursday, October 14, 2021 at 1:28:05 AM UTC-4 
ra...@linuxia.de wrote:

On 13/10/2021 22:13, Raj wrote:
> Hi All,
>
> I am trying to send one email to team after job is 
successfully completed.  Issue is playbook sending (if inventory have 100 servers 
). It is sending 100 emails.
>
> I tried in my code:  delegate_to: localhost and run_once: 
true it doesn't help please provide your inputs it really helpful .

That should work. Please provide your code.

Regards

   Racke

>
> TIA
> Raja
> --
> 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-proje...@googlegroups.com 
.
> To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b69b5eb1-7de3-4bce-80fd-2ca824fd07a0n%40googlegroups.com 

 
>.


-- 
Ecommerce and Linux consulting + Perl and web application programming.

Debian and Sympa administration.

-- 
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-proje...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f662886f-2a63-4988-a2b7-e15a4dfbfd16n%40googlegroups.com
 
.



-- 
Dick Visser

Trust & Identity Service Operations Manager
GÉANT
-- 
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-proje...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwNz4ToNKCBngPbHOtB4%3D%3DHbFvx%3DTCJ6%3D4CL-kSrgvrDUA%40mail.gmail.com
 
.

-- 
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-proje...@googlegroups.com.

To view this discussion on the web visit 

Re: [ansible-project] one email for multiple hosts

2021-10-22 Thread Raj
Hi, VGM

my playbook call roles  ssl scan  ( final part is email to send once)  but 
it is sending 100 emails

---
- hosts: "{{ web }}"
  gather_facts: yes
  roles:
- SSL_scan

On Thursday, October 14, 2021 at 11:09:29 AM UTC-4 dick@geant.org wrote:

> So, post that playbook
>
> On Thu, 14 Oct 2021 at 17:03, Raja Natte  wrote:
>
>> Hi..
>>
>>
>> Yes it is running in same playbook. 
>>
>> On Thu, Oct 14, 2021, 10:21 AM Dick Visser  wrote:
>>
>>> This is just the one mail task. 
>>> It must be part of a playbook, where other things happen as well, and 
>>> which will reveal the cause.
>>>
>>> Also, you say "I am trying to send one email to team after job is 
>>> successfully completed".
>>> I guess this "job" is the running of the playbook?
>>>
>>>
>>>
>>>
>>> On Thu, 14 Oct 2021 at 15:12, Raj  wrote:
>>>

 Hi Racke,

 This is my code

 - name: Sending email to about SSL scan
   mail:
 host: x
 port: 25
 subject: 
 body:  
 from: xxx
 to:
# - 
 - 
   delegate_to: localhost
   run_once: true
 On Thursday, October 14, 2021 at 1:28:05 AM UTC-4 ra...@linuxia.de 
 wrote:

> On 13/10/2021 22:13, Raj wrote: 
> > Hi All, 
> > 
> > I am trying to send one email to team after job is successfully 
> completed.  Issue is playbook sending (if inventory have 100 servers ). 
> It 
> is sending 100 emails. 
> > 
> > I tried in my code:  delegate_to: localhost and run_once: true it 
> doesn't help please provide your inputs it really helpful . 
>
> That should work. Please provide your code. 
>
> Regards 
>
>Racke 
>
> > 
> > TIA 
> > Raja 
> > -- 
> > 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-proje...@googlegroups.com  ansible-proje...@googlegroups.com>. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/b69b5eb1-7de3-4bce-80fd-2ca824fd07a0n%40googlegroups.com
>  
> <
> https://groups.google.com/d/msgid/ansible-project/b69b5eb1-7de3-4bce-80fd-2ca824fd07a0n%40googlegroups.com?utm_medium=email_source=footer>.
>  
>
>
>
> -- 
> Ecommerce and Linux consulting + Perl and web application programming. 
> Debian and Sympa administration. 
>
> -- 
 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-proje...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/ansible-project/f662886f-2a63-4988-a2b7-e15a4dfbfd16n%40googlegroups.com
  
 
 .

>>>
>>>
>>> -- 
>>> Dick Visser
>>> Trust & Identity Service Operations Manager
>>> GÉANT
>>>
>>> -- 
>>> 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-proje...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/ansible-project/CAL8fbwNz4ToNKCBngPbHOtB4%3D%3DHbFvx%3DTCJ6%3D4CL-kSrgvrDUA%40mail.gmail.com
>>>  
>>> 
>>> .
>>>
>> -- 
>> 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-proje...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/CA%2BuTAOgXB1y_ATqNWBtRXxNyVuysaVA8gBp3Scx8cJKFAR-nBA%40mail.gmail.com
>>  
>> 
>> .
>>
>
>
> -- 
> Dick Visser
> Trust & Identity Service Operations Manager
> GÉANT
>

-- 
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/5442881b-a03f-4997-aa38-bbf4a8d623den%40googlegroups.com.


[ansible-project] Want to add hidden password for url

2021-10-22 Thread vaishnavi kakad
Hi All, 

How we can add the hidden password in Ansible ?

For eg :
- name: Download image files
  get_url:
url: http://0.0.0.0/XYZ.tar.gz
url_username:XYZ
*url_password: * *  (I want to add hidden password here. ) 

Can you please let me know if you have any idea . 

Thanks,
Vaishnavi

-- 
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/12c7cb66-c96d-445c-bf07-57c47fabc049n%40googlegroups.com.


Re: [ansible-project] Ansible not installing the windows update

2021-10-22 Thread Dick Visser
On Fri, 22 Oct 2021 at 14:25, Lucky Lakshman 
wrote:

>
>   - name: Install only particular updates based on the KB numbers
> win_updates:
> category_name:
>

Typo?

-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
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/CAL8fbwPpe4JMCrbnf%3DJSEFMa5piJm4wHQsrzGX0dPWJB%2Bqkr1A%40mail.gmail.com.


[ansible-project] Ansible not installing the windows update

2021-10-22 Thread Lucky Lakshman
Hello,

I have used the below yaml file. The file is getting executing but the 
installation is not going on.

- hosts: win
  tasks:
  - name: Return list of found updates and log to C:\WinUpdates.txt
win_updates:
category_names: SecurityUpdates
state: searched
log_path: C:\WinUpdates.txt
  - name: Install only particular updates based on the KB numbers
win_updates:
category_name:
- SecurityUpdates
whitelist:
- KB2267602
reboot: yes

The log file is showing skipping the update as it is not under category 
name but i have mentioned it.

Skipping update 74ff725c-04c6-4a3e-9654-66b38618413f - Security 
Intelligence Update for Microsoft Defender Antivirus - KB2267602 (Version 
1.351.857.0) as it was not found in the category names filter
2021-10-22 12:16:47Z Calculating pre-install reboot requirement...
2021-10-22 12:16:47Z Native job completed with output: 
Name   Value



   -



updates{}  


 
found_update_count 0



changedFalse



reboot_requiredFalse



installed_update_count 0



filtered_updates   {74ff725c-04c6-4a3e-9654-66b38618413f}  


 
Can anyone help me on this

-- 
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/fecf21fd-58dd-4208-9af3-6112957be3fen%40googlegroups.com.


[ansible-project] mapping values are not allowed in this context

2021-10-22 Thread Yanni G
Hello everyone

I had a small task that used to work fine but suddenly it gives me errors. 

*FAILED! => {"msg": "The conditional check 'ACTION == \"install\"' failed. 
The error was: error while evaluating conditional (ACTION == \"install\"): 
'ACTION' is undefined\n\nThe error appears to be in 
'/etc/ansible/play/7zip.yml': line 10, column 6, but may\nbe elsewhere in 
the file depending on the exact syntax problem.\n\nThe offending line 
appears to be:\n\n#\n   - name: Installing 7zip\n ^ here\n"}*


Please see Yaml here:

https://pastebin.com/7cbSyPJy

Any suggestions I could try please. I did not change anything.

Thanks a lot

-- 
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/abf21592-0555-4083-b866-f79d271f3a36n%40googlegroups.com.