Re: [ansible-project] [WARNING]: provided hosts list is empty, only localhost is available

2020-05-25 Thread David Foley
It's outputting your items list, as you have msg on the list if you are looking to put the info you need to use a register then either var or message that register -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this

Re: [ansible-project] unable to generate backup file with registered variable in ansible

2020-05-25 Thread Dick Visser
On Mon, 25 May 2020 at 10:42, Sadanand Alegaonkar wrote: > > hello Stefan, > > I have to add more task in the playbook, that's why i going with this methods. I don't see why you have to? Duplicating logrotate functionality through ansible through shell scripts that need then need to be run

Re: [ansible-project] unable to generate backup file with registered variable in ansible

2020-05-25 Thread Sadanand Alegaonkar
hello Stefan, I have to add more task in the playbook, that's why i going with this methods. On Mon, 25 May 2020 at 10:46, Stefan Hornburg (Racke) wrote: > On 5/25/20 4:52 AM, Sadanand Alegaonkar wrote: > > Hello Dick, > > > > Thanks for giving reply, > > Yes corrected this error but the

Re: [ansible-project] unable to generate backup file with registered variable in ansible

2020-05-25 Thread Stefan Hornburg (Racke)
On 5/25/20 10:42 AM, Sadanand Alegaonkar wrote: > hello Stefan, > > I have to add more task in the playbook, that's why i going with this methods. That is hardly a good reason, especially without further explanation. Regards Racke > > On Mon, 25 May 2020 at 10:46, Stefan Hornburg

Re: [ansible-project] unable to generate backup file with registered variable in ansible

2020-05-25 Thread Stefan Hornburg (Racke)
On 5/25/20 11:36 AM, Sadanand Alegaonkar wrote: > Hello Stefan, > >   Yes log rotation is good option i will this further..  >   > I am working on file deletion use case. In that i am having different mount > points directory, before deletion i need to > take backup of old file and delete > them

Re: [ansible-project] unable to generate backup file with registered variable in ansible

2020-05-25 Thread Sadanand Alegaonkar
hello Stefen, I really appreciate your effort to understand my concern. I am specifying mount_points variable in Inventory file and try to keep copy DC-N5K-01 ansible_host=** ansible_ssh= mount_points=["/var/log"] *- name: list file shell: cd "{{item}}"; find *.log

Re: [ansible-project] Merge Dictionary

2020-05-25 Thread Vladimir Botka
On Sun, 24 May 2020 07:10:36 -0700 (PDT) Shaun Rampersad wrote: > PS: I'm part of Isa's team :) I'll also take a look at the ansible plugin Let me know if this might meet the high standards of the code. -- You received this message because you are subscribed to the Google Groups "Ansible

Re: [ansible-project] unable to generate backup file with registered variable in ansible

2020-05-25 Thread Sadanand Alegaonkar
Hello Stefan, Yes log rotation is good option i will this further.. I am working on file deletion use case. In that i am having different mount points directory, before deletion i need to take backup of old file and delete them . I added mount name in the inventory. Below is the Playbook...

Re: [ansible-project] [WARNING]: provided hosts list is empty, only localhost is available

2020-05-25 Thread Tony Wong
what line am i missing to output the information? without using - On Sun, May 24, 2020 at 11:17 PM David Foley wrote: > It's outputting your items list, as you have msg on the list if you are > looking to put the info you need to use a register then either var or > message that register > >

Re: [ansible-project] [WARNING]: provided hosts list is empty, only localhost is available

2020-05-25 Thread Tej Singh Rana
> > You have to use register module and get that output from debug module. > > -- 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] ansible kerberos library is not installed

2020-05-25 Thread Tony Wong
not sure what happened but this was working last week. now I am getting this error tony@ubuntu:~/windows$ ansible windows -i hosts -m win_ping -v ansible 2.9.0 config file = /etc/ansible/ansible.cfg configured module search path = [u'/home/tony/.ansible/plugins/modules',

Re: [ansible-project] ansible kerberos library is not installed

2020-05-25 Thread Tony Wong
any idea? I cant connect to my windows machines now and winrm is setup correctly On Mon, May 25, 2020 at 6:44 AM Tony Wong wrote: > not sure what happened but this was working last week. > > now I am getting this error > > > tony@ubuntu:~/windows$ ansible windows -i hosts -m win_ping -v

Re: [ansible-project] ansible kerberos library is not installed

2020-05-25 Thread Tony Wong
maybe I am missing krb? tony@ubuntu:~/windows$ sudo apt install -y krb5-user libpam-krb5 libpam-ccreds auth-client-config Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an

Re: [ansible-project] ansible kerberos library is not installed

2020-05-25 Thread Tony Wong
any ieea? I am able to chem ntlm auth is working fine. its just kerberos is failed On Mon, May 25, 2020 at 8:39 AM Tony Wong wrote: > maybe I am missing krb? > > > tony@ubuntu:~/windows$ sudo apt install -y krb5-user libpam-krb5 > libpam-ccreds auth-client-config > Reading package lists... Done

Re: [ansible-project] ansible shell variable

2020-05-25 Thread Andrew Morgan
Thank you , this actually worked, but the issue is that it presents another MAC address from the one in AWS, so I am still getting an error detailed below: 22:00:0b:0b:97:4e is the MAC address from debug, and 22:00:0b:0b:97:4e is the MAC from aws metadata. changed: [deVPN] TASK [debug]

Re: [ansible-project] ansible kerberos library is not installed

2020-05-25 Thread David Foley
I would advise speaking to your AD Team or your GPO Administrator, They may have updated their GPO Policies to stop communication over the ports used for Kerberos: This Issue doesn't seem to be an Ansible issue but an issue with your Environment setup. -- You received this message because

Re: [ansible-project] ansible kerberos library is not installed

2020-05-25 Thread Jordan Borean
The error message is saying The python kerberos library is not installed > Make sure you have installed pykerberos by running 'pip install pykerberos' or if you are managing Python packages through your system package manager 'apt install python-kerberos'. You can verify whether it is

Re: [ansible-project] ansible kerberos library is not installed

2020-05-25 Thread Jordan Borean
Please read the docs, there are a few packages that need to be installed for pip to compile the pykerberos library https://docs.ansible.com/ansible/latest/user_guide/windows_winrm.html#installing-the-kerberos-library. -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] ansible kerberos library is not installed

2020-05-25 Thread Tony Wong
getting this error tony@ubuntu:~$ sudo pip install pykerberos [sudo] password for tony: DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More

Re: [ansible-project] ansible kerberos library is not installed

2020-05-25 Thread Antony Stone
On Tuesday 26 May 2020 at 01:10:53, Tony Wong wrote: > getting this error > > tony@ubuntu:~$ sudo pip install pykerberos Why use sudo? > WARNING: The directory '/home/tony/.cache/pip' or its parent directory is > not owned or is not writable by the current user. The cache has been > disabled.

Re: [ansible-project] ansible shell variable

2020-05-25 Thread Andrew Morgan
Thank you very much for the help On Monday, 25 May 2020 01:16:43 UTC-4, Vladimir Botka wrote: > > On Sun, 24 May 2020 20:31:12 -0700 (PDT) > Andrew Morgan > wrote: > > > > > 1) get the mac address > > > > 2) get the subnet > > > > > > > > --- > > > > - hosts: dev > > > > become: true >

[ansible-project] Parsing results

2020-05-25 Thread Andrew Morgan
Hello All, I have a script below that will get the instance ID and the subnet ID and then out put the information. I am using the module ec2_instance_info https://docs.ansible.com/ansible/latest/modules/ec2_instance_info_module.html#ec2-instance-info-module. I am able to get the instance ID

[ansible-project] Using variable to compare stdout parameter

2020-05-25 Thread Sivakumar Saravanamuthu
Hi I am writing a post build verification task and servers are located in three difference location. US, EU and AU I want to check chrony.conf output so that if servers in group_names US it should check chrony.conf file to see server parameter is reflect NTP server in that region and so