[ansible-project] Copy Module with host name in file: dest: "/root/file

2020-10-23 Thread Sobhan Anavarapu
Hi All, I am seeking for your help if I can create files in the controller node with the output we generate against the multiple IP's Eg: If I am passing 2 IP's with vars_prompt. In copy module it should create 2 different file with IP's we passed and save the data. --- - name: check hosts: lo

Re: [ansible-project] Copy Module with host name in file: dest: "/root/file

2020-10-23 Thread Dick Visser
The template task should loop over configout On Fri, 23 Oct 2020 at 09:36, Sobhan Anavarapu wrote: > Hi All, > I am seeking for your help if I can create files in the controller node > with the output we generate against the multiple IP's > Eg: If I am passing 2 IP's with vars_prompt. In copy

Re: [ansible-project] Copy Module with host name in file: dest: "/root/file

2020-10-23 Thread Sobhan Anavarapu
Yes template module will loop. But i seeking to create multiple files with there respective output But receiving below error fatal: [localhost]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'item' is undefined\n\nThe error appears to be in '/ro

Re: [ansible-project] Copy Module with host name in file: dest: "/root/file

2020-10-23 Thread Dick Visser
On Fri, 23 Oct 2020 at 09:54, Sobhan Anavarapu wrote: > > Yes template module will loop. But i seeking to create multiple files with > there respective output No the template module will not loop. But it should. What i meant to say is that YOU should change the code and ADD a loop statement. But

Re: [ansible-project] Re: Command Not found but module is installed

2020-10-23 Thread Fiend Busa
I tried updating ansible but it keeps installing version 2.9.6 every time and not 2.10 As for ansible-doc -l | grep aruba I get the following: aruba_command aruba_config aruba_module_installer On Thursday, October 22, 2020 at 4:09:45 PM UTC-4 phil.gr...@gmail.com wrote: > Check file permissio

Re: [ansible-project] Re: Command Not found but module is installed

2020-10-23 Thread Fiend Busa
Im running ansible through AWX if that makes a difference. On Friday, October 23, 2020 at 9:56:21 AM UTC-4 Fiend Busa wrote: > I tried updating ansible but it keeps installing version 2.9.6 every time > and not 2.10 > > As for ansible-doc -l | grep aruba > > I get the following: > > aruba_comman

Re: [ansible-project] Re: Command Not found but module is installed

2020-10-23 Thread Fiend Busa
Ok i was able to update to 2.10 ansible-galaxy collection list does indeed show arubanetworks.aos_switch On Friday, October 23, 2020 at 9:57:43 AM UTC-4 Fiend Busa wrote: > Im running ansible through AWX if that makes a difference. > > On Friday, October 23, 2020 at 9:56:21 AM UTC-4 Fiend Busa

Re: [ansible-project] Re: Command Not found but module is installed

2020-10-23 Thread phil.gr...@gmail.com
Yes that'll make all the difference! You should have logged this issue against the awx group and given the full info upfront, so we could get to this point a lot quicker! You don't need to install that collection locally first when using with awx. Just drop a requirements.yml file into a repo wi

[ansible-project] Ansible playbook execution from webportal

2020-10-23 Thread Sathiya Vasagan
Hi Team, we need to execute Ansible playbook from java webportal using Ansible Engine -- 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+unsubsc

[ansible-project] unable tp ping esx hosts

2020-10-23 Thread Tony Wong
I am trying simple ping command to esx host but keep getting this ansible esx -m ping ansible esxhost-m ping esxhost | FAILED! => { "msg": "to use the 'ssh' connection type with passwords, you must install the sshpass program" } -- You received this message because you are subscrib

[ansible-project] Re: unable tp ping esx hosts

2020-10-23 Thread Tony Wong
ansible esx -u root -m ping - ansible 2.10.2 config file = /Users/twong/virtualenv/ansible/vmware/ansible.cfg configured module search path = ['/Users/twong/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.8/site-pa

[ansible-project] Re: unable tp ping esx hosts

2020-10-23 Thread Sobhan Anavarapu
Please install SSHpass on your controller node. yum install sshpass -y On Friday, October 23, 2020 at 9:27:35 PM UTC+5:30 tdub...@gmail.com wrote: > ansible esx -u root -m ping - > ansible 2.10.2 > config file = /Users/twong/virtualenv/ansible/vmware/ansible.cfg > configured module search

Re: [ansible-project] Re: Command Not found but module is installed

2020-10-23 Thread Fiend Busa
:O Sorry haha, I will try that, fingers crossed! On Friday, October 23, 2020 at 11:15:38 AM UTC-4 phil.gr...@gmail.com wrote: > Yes that'll make all the difference! You should have logged this issue > against the awx group and given the full info upfront, so we could get to > this point a lot

[ansible-project] l2 Interfaces

2020-10-23 Thread Richard Lucht
When I run this in ansible I pull a list of interfaces off a network switch. --- - name: show interfaces hosts: all connection: network_cli gather_facts: no vars: ansible_network_os: ios tasks: - name: test ios_facts: gather_subset: - 'min' gather

Re: [ansible-project] Re: Command Not found but module is installed

2020-10-23 Thread Fiend Busa
Im still getting the same error :( ERROR! couldn't resolve module/action 'arubaoss_command'. This often indicates a misspelling, missing collection, or incorrect module path. in my github I have a file named requirements.yml --- collections: - name: arubanetworks.aos_switch source: htt

[ansible-project] Performing action on list items inside another loop

2020-10-23 Thread Akshay Kumar
Hi guys, Please provide your advise on below scenario: Finding files and putting in a list code - - name: find Files to move find: paths: '{{ item.VlclDirName }}' patterns: '{{ item.VlclFileSpec }}' register: filesfound when: item.VlclDirName is defined and item.VlclUser == Vlc

[ansible-project] Re: unable tp ping esx hosts

2020-10-23 Thread Tony Wong
but I am on osX in virtualenv On Friday, October 23, 2020 at 9:09:00 AM UTC-7 sobhan.a...@gmail.com wrote: > Please install SSHpass on your controller node. > yum install sshpass -y > > On Friday, October 23, 2020 at 9:27:35 PM UTC+5:30 tdub...@gmail.com > wrote: > >> ansible esx -u root -m ping

[ansible-project] Re: unable tp ping esx hosts

2020-10-23 Thread Tony Wong
ok got it installed with this brew install esolitos/ipa/sshpass but when i ping my host, I get this (ansible) xxx@ vmware % ansible esx -m ping -u root --ask-pass SSH password: [WARNING]: No python interpreters found for host myesx (tried ['/usr/bin/python', 'python3.7', 'python3.6', 'py

Re: [ansible-project] Re: Command Not found but module is installed

2020-10-23 Thread Phil Griffiths
Hummm. I suggest you try the same mechanism with 1) a different module from the same collection and 2) a different collection On Fri, 23 Oct 2020 at 17:56, Fiend Busa wrote: > Im still getting the same error :( > > ERROR! couldn't resolve module/action 'arubaoss_command'. This often > indica

Re: [ansible-project] Ansible playbook execution from webportal

2020-10-23 Thread Dick Visser
And the ansible related question is...? On Fri, 23 Oct 2020 at 17:35, Sathiya Vasagan wrote: > Hi Team, > > we need to execute Ansible playbook from java webportal using Ansible > Engine > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group.

Re: [ansible-project] Re: Command Not found but module is installed

2020-10-23 Thread Fiend Busa
Will do! Btw I do have a cisco asa collection which I installed locally from the command line on the server with galaxy-install. That one is working great via AWX. On Friday, October 23, 2020 at 2:45:18 PM UTC-4 phil.gr...@gmail.com wrote: > Hummm. I suggest you try the same mechanism with 1) a

[ansible-project] Create a list of Failed tasks

2020-10-23 Thread colli...@gmail.com
Hello, I am trying to get a list of devices that are out of compliance with Cisco licensing. I would like to take failed out of compliance devices and add them to a list. Then send it to Microsoft Teams. What I am looking for is a list to just send to Teams once, instead of trying to send

Re: [ansible-project] Create a list of Failed tasks

2020-10-23 Thread Vladimir Botka
Set variable OOC_status in the block and use it to select the list of the hosts. See the inline code below (not tested) On Fri, 23 Oct 2020 12:47:45 -0700 (PDT) "colli...@gmail.com" wrote: > I am trying to get a list of devices that are out of compliance with Cisco > licensing... > > - name:

[ansible-project] Advice on build Immutable VM's ( VMware )

2020-10-23 Thread SP
Hi, Advice on build Immutable VM's ( VMware ) and is that possible using Ansible ? What is the best way to do? -- 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

[ansible-project] need a playbook to change esxi root pass

2020-10-23 Thread Tony Wong
How do I change the root password on all esxi hosts with a pb? -- 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.