Re: [ansible-project] User issue while pinging the hosts

2020-07-07 Thread Dick Visser
Read these docs and make sure you understand them: https://docs.ansible.com/ansible/latest/user_guide/connection_details.html https://docs.ansible.com/ansible/latest/user_guide/become.html On Wed, 8 Jul 2020 at 05:49, Mahesh N wrote: > Facing the below error while logging as my user

[ansible-project] User issue while pinging the hosts

2020-07-07 Thread Mahesh N
Facing the below error while logging as my user (mahesh) and performing the actions on service user (service). ERROR: fatal: [10.0.0.1]: UNREACHABLE! => {"changed": false, "msg": "Authentication failure.", "unreachable": true} Tried: - name: deploy elasticsearch hosts: all remote_user:

Re: [ansible-project] Newbie question: Using ansible for runbook automation type of tasks

2020-07-07 Thread Mike Eggleston
Yes, Ansible can do that. Mike > On Jul 7, 2020, at 19:36, Ravi Malghan wrote: > >  > I am looking for an application that can be used as a runbook automation tool > from a monitoring platform (nagios). From nagios I have the ability to run > scripts from the Nagios server. I need to build

[ansible-project] Newbie question: Using ansible for runbook automation type of tasks

2020-07-07 Thread Ravi Malghan
I am looking for an application that can be used as a runbook automation tool from a monitoring platform (nagios). From nagios I have the ability to run scripts from the Nagios server. I need to build a simple script that ssh to a remote server, look for some log files, delete them if it

Re: [ansible-project] Conditional wild card usage

2020-07-07 Thread Vladimir Botka
On Tue, 7 Jul 2020 12:46:07 -0700 (PDT) sandeep athoti wrote: > when: ansible_distribution_major_version|int == 6 or ansible_fqdn == > "test[0-1][0-9].example.com" See "Testing strings" https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html#testing-strings For example -

[ansible-project] Conditional wild card usage

2020-07-07 Thread sandeep athoti
Is there any way I can use the wild cards or regex in when statements, when: ansible_distribution_major_version|int == 6 or ansible_fqdn == "test[0-1][0-9].example.com" I actually do not want to pass hostname of my server in vars section. Will this regex work with in conjunction with

[ansible-project] Re: Trying to install Feature update to Windows 10, version 1909 with Ansible

2020-07-07 Thread Alan Woods
Sorry here is the rest of the output from the play with -vvv it got cut off for some reason: TASK [Upgrade Windows 10] task path: /home/vagrant/ansible/win_10_Updates/testFeatureUPdate.yml:8

[ansible-project] Re: Trying to install Feature update to Windows 10, version 1909 with Ansible

2020-07-07 Thread Alan Woods
I have also tired these: --- - hosts: win10-pro-1 gather_facts: yes tasks: - name: Re-Boot PC before upgrade win_reboot: - name: Upgrade Windows 10 win_updates: category_names: - Upgrades state: installed reboot: yes and --- -

[ansible-project] Re: Ansible playbook is not working on the target host but shows in play recap - OK

2020-07-07 Thread Alan Woods
Hello I am wandering if this ever got resolved. I am also running a play book to upgrade a windows 10 box to 1909. The play book seems to run fine it says there were changes the windows 10 box re-boots several times but at the end it is not upgraded. I tried the play from this post which was:

[ansible-project] Re: vmware tools update.completed but shows failed status

2020-07-07 Thread tdub...@gmail.com
any idea ? On Monday, July 6, 2020 at 8:21:15 AM UTC-7 tdub...@gmail.com wrote: > I got following to update vmware tools on windows vm > > --- > - name: testing win_get_url > hosts: all > tasks: > - name: Create Directory if not exist > win_file: > path: C:\temp >

[ansible-project] Re: win_update to upgrade windows 10 version

2020-07-07 Thread Alan Woods
Hello. I am trying to upgrade some of my windows 10 boxes with ansible and it never seems to work. The play book runs for awhile then it is done but with no errors but does not actually upgrade the system. Could you share you working playbook to see what I am missing? I also have my play book

[ansible-project] Re: Trying to install Feature update to Windows 10, version 1909 with Ansible

2020-07-07 Thread Alan Woods
Can anyone help with this? On Monday, July 6, 2020 at 10:59:39 AM UTC-7, Alan Woods wrote: > > Hello I am trying to install windows 10 feature updates or upgrades. The > playbook I am using seems to download it but it will not install it. I > still need to go into windows updates and hit retry

Re: [ansible-project] Looping CF Templates with items loops and its reporting an error

2020-07-07 Thread Stefan Hornburg (Racke)
On 7/7/20 4:28 PM, ameya agashe wrote: > Thanks, Dick, I did try and it is moving forward. But I think still something > is fundamentally rooted. > > My main.yml looks like below with_file puts the *contents* of each file into {{ item }} So try with_items instead :-) Regards Racke >

Re: [ansible-project] Subclassing ansible.utils.display.Display in custom callback plugin

2020-07-07 Thread Nagesh sheregar
Hi Pieter, sorry for the confus, i would like to see output like below: *Socket Locator* *Status* *Size* *Max Supported Frequency* *Technology* PROC 1 DIMM 3 Good, In Use 32.00 GB 2666 MHz RDIMM now i am getting below output and it's hard to read so do you have any example plugin which can

Re: [ansible-project] Subclassing ansible.utils.display.Display in custom callback plugin

2020-07-07 Thread piete...@gmail.com
Hi , excuse me, but I don't get the question here... How can I help you ? Op dinsdag 7 juli 2020 om 16:04:32 UTC+2 schreef nage...@gmail.com: > Hi peter, > > if you don't mind please send me output, i would like to get something > like below > > *Socket Locator* *Status* *Size* *Max

Re: [ansible-project] Looping CF Templates with items loops and its reporting an error

2020-07-07 Thread ameya agashe
Thanks, Dick, I did try and it is moving forward. But I think still something is fundamentally rooted. My main.yml looks like below ``` cat main.yml --- # tasks file for patching-cf-ssm - name: create a cloudformation stack cloudformation: #aws_access_key: "{{

Re: [ansible-project] Subclassing ansible.utils.display.Display in custom callback plugin

2020-07-07 Thread Nagesh sheregar
Hi peter, if you don't mind please send me output, i would like to get something like below *Socket Locator* *Status* *Size* *Max Supported Frequency* *Technology* PROC 1 DIMM 3 Good, In Use 32.00 GB 2666 MHz RDIMM On Tue, Jul 7, 2020 at 5:19 AM piete...@gmail.com wrote: > Hi all, > > please

Re: [ansible-project] How to structure variables to distinguish different environments

2020-07-07 Thread Xinhuan Zheng
Hello, That construct actually makes sense to me. The fact of Development vs. Production is controlled by their network. We can just create custom fact based on each host IP address, and return customer fact variable. Then we can set nfs_server per that custom fact. Thanks for showing this

[ansible-project] Re: Subclassing ansible.utils.display.Display in custom callback plugin

2020-07-07 Thread piete...@gmail.com
To answer myself... I figured this simple solution : in '__init__()' self.realdisplay = self._display.display self._display.display = self.display then add a 'display()' method that intercept my message, and then calls 'self.realdisplay()' Gonna run some tests now. Thanks

Re: [ansible-project] Looping CF Templates with items loops and its reporting an error

2020-07-07 Thread Dick Visser
with_file should be indented back On Tue, 7 Jul 2020 at 07:13, ameya agashe wrote: > > Hello, > > Here is the tasks/main.yml content > ``` > roles/patching-cf-ssm/tasks/main.yml > --- > # tasks file for patching-cf-ssm > - name: create a cloudformation stack > cloudformation: > stack_name:

[ansible-project] Subclassing ansible.utils.display.Display in custom callback plugin

2020-07-07 Thread piete...@gmail.com
Hi all, please allow me to ask for any help here... I once wrote a custom callback plugin, where I subclassed ansible.utils.display.Display so I could overrule it's display() method to manipulate the message to be printed, and then call super(Display, self).display(. Since Ansible 2.8 the

Re: [ansible-project] cisco ios connect ssh error

2020-07-07 Thread Srinivas Naram
Username, Password is null. How are you passing user credentials ? Would it be possible to share playbook ? On Tue, Jul 7, 2020 at 2:50 PM wrote: > Yes , I can connect ssh,but still show error > > > > > > “ssh sandy@ > > Password: > > > >--- Global Limited --- > > > >

RE: [ansible-project] cisco ios connect ssh error

2020-07-07 Thread sandy.hung
Yes , I can connect ssh,but still show error � � “ssh sandy@ Password: � --- Global Limited --- � Unauthorized access is strictly prohibited *** tpesw-01# tpesw-01# “ � � fatal: [tpesw-01]: FAILED! => { "ansible_facts": {},

[ansible-project] Challenge Response based authentication in ansible

2020-07-07 Thread 'Akshay Rathod' via Ansible Project
Hi, I want to maintain linux servers with challenge response based authentication with ansible, not able to find document around it. Please help me out with any useful document. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

Re: [ansible-project] cisco ios connect ssh error

2020-07-07 Thread Srinivas Naram
Are you able to connect to Cisco Switch from Ansible server via ssh ? The error says 'Connection Error'. On Tue, Jul 7, 2020 at 1:03 PM Sandy Hung wrote: > I connect cisco switch run playbook show error msg > please help thanks. > fatal: [tpesw-01]: FAILED! => { > "ansible_facts": {}, >

[ansible-project] cisco ios connect ssh error

2020-07-07 Thread Sandy Hung
I connect cisco switch run playbook show error msg please help thanks. fatal: [tpesw-01]: FAILED! => { "ansible_facts": {}, "changed": false, "failed_modules": { "ios_facts": { "exception": "WARNING: The below traceback may *not* be related to the actual failure.\n

[ansible-project] Booting custom ISO file by ansible hpilo_boot on a physical server

2020-07-07 Thread DevOps Automation
Hi, Has anyone booted an ISO file through HP ILO by using ansible? 1. If yes, can you please explain how the connection is established between remote and host server. Also the booting procedure. 2. After booting the server how can we automate the process/pass the variables to assign the

Re: [ansible-project] How to split value from list

2020-07-07 Thread Srinivas Naram
How do we incorporate if-else in set_fact ? On Tue, Jul 7, 2020 at 11:26 AM Jenisha T wrote: > This logic works. Thankyou > > On Tuesday, 7 July 2020 at 10:52:51 UTC+5:30 Karl Auer wrote: > >> so what's wrong with: >> >> USR="jenisha" >> FOUND=`grep $USR /etc/passwd | cut -d: -f1` >> if [ -z