Re: [ansible-project] telnet issue

2020-04-22 Thread Werner Flamme
Zaldy B schrieb am 23.04.20 um 05:45: > HI Brian, > > Thank you for the reply. > > I did the 5v's as you mentioned, and dont know why it is saying that the > hosts does not match. > > TEMPLATES]# cp IOS_telnet.yaml /etc/ansible/ > [root@spm6637 TEMPLATES]# ansible-playbook -i Cisco_Telnet

Re: [ansible-project] telnet issue

2020-04-22 Thread Zaldy B
Here is my cfg file: ansible]# cat ansible.cfg [defaults] # Use local hosts file inventory = /etc/ansible/hosts # Disable SSH key host checking (RSA fingerprints) host_key_checking = False # Do not create .retry files on job failures retry_files_enabled = False # Do not gather facts gathering

Re: [ansible-project] telnet issue

2020-04-22 Thread Zaldy B
I can also see my inventory: TEMPLATES]# ansible all --list-hosts hosts (1): d2c2e-be-ag249-o On Wednesday, April 22, 2020 at 11:45:30 PM UTC-4, Zaldy B wrote: > > HI Brian, > > Thank you for the reply. > > I did the 5v's as you mentioned, and dont know why it is saying that the > hosts

Re: [ansible-project] telnet issue

2020-04-22 Thread Zaldy B
HI Brian, Thank you for the reply. I did the 5v's as you mentioned, and dont know why it is saying that the hosts does not match. TEMPLATES]# cp IOS_telnet.yaml /etc/ansible/ [root@spm6637 TEMPLATES]# ansible-playbook -i Cisco_Telnet IOS_telnet.yaml [WARNING]: Unable to parse

Re: [ansible-project] [WARNING]: Module invocation had junk after the JSON data:

2020-04-22 Thread Dick Visser
Hi Thanks for using ansible. To answer your question more information is needed. Could you please describe clearly all of the below: - What goal you are trying to achieve. - How you are doing this. - What problems you encounter. - Which commands did you run, and what actual output did you

Re: [ansible-project] setting explicit remote shell

2020-04-22 Thread Brian Coca
if you set these as environment variables, Ansible is not going to do anything with them, they need to be variables. ansible_shell_executable: "/usr/bin/ksh" ansible_shell_interpreter: "/usr/bin/ksh" ansible_python_interpreter: "/opt/bin/python" Also the `environment:` keyword won't affect

[ansible-project] associating IAM role with AWS redshift cluster in ansible

2020-04-22 Thread Raymond Yee
I would like to attach IAM roles to a redshift cluster in my ansible playbook but don’t see any parameter for IAM roles in the redshift module (https://docs.ansible.com/ansible/latest/modules/redshift_module.html). Such options do exist in the boto3 library

[ansible-project] [WARNING]: Module invocation had junk after the JSON data:

2020-04-22 Thread R2
Has anyone ever seen this issue with ansible when attempting to install a yum package -- 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

Re: [ansible-project] Extract content in the register variable stdout value

2020-04-22 Thread Stefan Hornburg (Racke)
On 4/22/20 8:56 PM, Josephsimon Arokiaraj wrote: > Hi All, > > I am capturing the script output in the ansible play using register and using > it on another role.  The register value > contains some additional characters. > >   - name: Extracting Hostname > >   local_action: command

[ansible-project] Extract content in the register variable stdout value

2020-04-22 Thread Josephsimon Arokiaraj
Hi All, I am capturing the script output in the ansible play using register and using it on another role. The register value contains some additional characters. - name: Extracting Hostname local_action: command /usr/bin/perl extracturl.pl {{ url }} port register: port I

Re: [ansible-project] [WARNING]: "register" is not templatable, but we found:

2020-04-22 Thread Laurent HENSSEN
Interesting, I also just found that. I did try that : --- - set_fact: "{{ path_list }}": "{{ rrr.results }}" - debug: var=ansible_facts - debug: var="{{ path_list }}" --- where "rrr" is the "register: rrr" part. And so, I can copy the content of "rrr" (previously registered) to fact with

Re: [ansible-project] Check status of VMware tools & reboot if VMware tools are not running

2020-04-22 Thread Dick Visser
With all due respect, this is a support mailing list, not a chat room. I will suggest to spend some time doing research first, before firing off a ton of questions that could have been answered by Googling for 10 seconds. On Wed, 22 Apr 2020 at 19:20, Tony Wong wrote: > > I am finding

[ansible-project] Check for existing ACI contract between 2 IPs using Ansbile

2020-04-22 Thread Dave Zarei
Hi, I'm trying to figure out a way to check for any existing contract between 2 IPs in ACI using Ansible before creating a contract, any aci_rest get method? Thanks, -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from

Re: [ansible-project] Check status of VMware tools & reboot if VMware tools are not running

2020-04-22 Thread Tony Wong
I am finding switching from powercli to ansible for vmware tough. any benefits to using ansible vs powercli? On Wed, Apr 22, 2020 at 10:16 AM David Foley wrote: > You need to do loop on the var > > -- > You received this message because you are subscribed to the Google Groups > "Ansible

Re: [ansible-project] Check status of VMware tools & reboot if VMware tools are not running

2020-04-22 Thread David Foley
You need to do loop on the var -- 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

Re: [ansible-project] Check status of VMware tools & reboot if VMware tools are not running

2020-04-22 Thread Tony Wong
hi to run this for multiple machines, do i need to put it in a vars file? On Wed, Apr 22, 2020 at 9:58 AM Tony Wong wrote: > ok got it > > > > > On Wed, Apr 22, 2020 at 9:39 AM David Foley wrote: > >> You need to debug out the message >> >> -- >> You received this message because you are

Re: [ansible-project] Check status of VMware tools & reboot if VMware tools are not running

2020-04-22 Thread Tony Wong
ok got it On Wed, Apr 22, 2020 at 9:39 AM David Foley wrote: > You need to debug out the message > > -- > 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

Re: [ansible-project] Need help for some logic

2020-04-22 Thread Rahul Kumar
Ansible gurus, any suggestions? On Wed, 22 Apr 2020 at 13:44, Rahul Kumar wrote: > In short , I want this configuration file as an interface between > mymasterplaybook.yml and individual roles , also mymasterplaybook.yml need > to recognize this file to fill its dynamic params . > > Rahul > >

Re: [ansible-project] Yum update on multiple hosts but using a cusom repo file

2020-04-22 Thread Jack Morgan
Hello, Based on the situation you define below, it sounds like you are wanting to add a custom yum repository to some hosts. Let's look at how you could go about doing it. (1) You will need to create a yum repository file on your hosts. This file will point to your custom repository on your Yum

Re: [ansible-project] Check status of VMware tools & reboot if VMware tools are not running

2020-04-22 Thread David Foley
You need to debug out the message -- 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

Re: [ansible-project] Re: [WARNING]: "register" is not templatable, but we found:

2020-04-22 Thread Matt Martz
`register` has never been templatable. Previously it would create a literal variable called `{{ var }}` which included the brackets. When looping and using register, see https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html#registering-variables-with-a-loop On Wed, Apr 22,

[ansible-project] Re: [WARNING]: "register" is not templatable, but we found:

2020-04-22 Thread Laurent HENSSEN
Let me add a quick update : - I'm trying to process several paths - paths are grouped and so, there are several "list" of paths (because need to generate from template and it's different regarding the list) - objective was to use an compact / easier code (instead of copy existing task for a

Re: [ansible-project] [WARNING]: "register" is not templatable, but we found:

2020-04-22 Thread Stefan Hornburg (Racke)
On 4/22/20 6:07 PM, Laurent HENSSEN wrote: > Hello,  > > > I'm trying to register a var through a dynamical use of "register" (I mean : > using a var, like : register: {{ var }}). > > Dev updated the code and removed this option (now static only). > I'm not able to find more information about

[ansible-project] [WARNING]: "register" is not templatable, but we found:

2020-04-22 Thread Laurent HENSSEN
Hello, I'm trying to register a var through a dynamical use of "register" (I mean : using a var, like : register: {{ var }}). Dev updated the code and removed this option (now static only). I'm not able to find more information about that change and also there is nobody connected on the IRC

Re: [ansible-project] Check status of VMware tools & reboot if VMware tools are not running

2020-04-22 Thread Tony Wong
my ansible version tony@ubuntu:~/ansiblework$ ansible --version ansible 2.9.0 config file = /home/tony/ansiblework/ansible.cfg configured module search path = [u'/home/tony/ansiblework/library'] ansible python module location = /home/tony/.local/lib/python2.7/site-packages/ansible

Re: [ansible-project] Check status of VMware tools & reboot if VMware tools are not running

2020-04-22 Thread David Foley
Still ident While Fixing The Last Ident Issue you seem to have moved everything to the Left: Abhijeet Kasurde Just attached the Correct Way of Doing It; I would Recommend Reading / Watching Some Ansible Videos before taken on some Projects: you may end-up doing more harm then good within your

Re: [ansible-project] Check status of VMware tools & reboot if VMware tools are not running

2020-04-22 Thread Dick Visser
You continue to get that error because you continue to mess up the indentation. Sort that first. https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html On Wed, 22 Apr 2020 at 16:41, Tony Wong wrote: > > I just upgraded ansible to 2.9 > > but still getting this error > >

[ansible-project] How to run 2 playbooks in parallel using a master playbook and monitor for any error

2020-04-22 Thread Happy Souls
Hi, I would appreciate if someone could share a simple example of running 2 playbooks running in parallel, called in a master playbook . smallest of examples of basic tasks would be great. Regards, Abhishek -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] Will `with_*` loops be removed once 2.10 is out?

2020-04-22 Thread 'Felix Fontein' via Ansible Project
Hi, also (forgot to mention that in my previous mail), in 2.10 the short name will automatically redirect to the long name for plugins (and modules) that were already in 2.9. I.e. with_flattened will continue to work. (Except if you don't install the community.general collection, then of course

Re: [ansible-project] Will `with_*` loops be removed once 2.10 is out?

2020-04-22 Thread Nick Kakouros
Thanks for the tip! On Wednesday, April 22, 2020 at 1:50:55 PM UTC, Felix Fontein wrote: > > Hi Nick, > > > Is the a way to combine `with_` and a lookup from a collection? E.g. > > the flattened lookup from community.general. > > you can use "with_namespace.collection.plugin:". > > Looks

Re: [ansible-project] Will `with_*` loops be removed once 2.10 is out?

2020-04-22 Thread 'Felix Fontein' via Ansible Project
Hi Nick, > Is the a way to combine `with_` and a lookup from a collection? E.g. > the flattened lookup from community.general. you can use "with_namespace.collection.plugin:". Looks ugly, but works :) Cheers, Felix -- You received this message because you are subscribed to the Google

Re: [ansible-project] Help with ios_command Module

2020-04-22 Thread Srinivas Naram
You can use ignore_errors=True On Wed, Apr 22, 2020 at 6:48 PM Omar Hegazy wrote: > Hello, i have 2 switches. I wanted to run a command (show arp) and check a > specific output if exist or not on both. Then, i wanted to run a command > (show arp) and display the output. > > The problem is that

[ansible-project] Will `with_*` loops be removed once 2.10 is out?

2020-04-22 Thread Nick Kakouros
Is the a way to combine `with_` and a lookup from a collection? E.g. the flattened lookup from community.general. -- 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

[ansible-project] Help with ios_command Module

2020-04-22 Thread Omar Hegazy
Hello, i have 2 switches. I wanted to run a command (show arp) and check a specific output if exist or not on both. Then, i wanted to run a command (show arp) and display the output. The problem is that since the output i'm inspecting on first task doesn't exist on switch1 the next task

Re: [ansible-project] Yum update on multiple hosts but using a cusom repo file

2020-04-22 Thread Stefan Hornburg (Racke)
On 4/22/20 10:26 AM, Quad Zero wrote: > Hi Vivek, > > On each machine, I would run yum update on it. My repo file points to the > server > http://192.168.0.5/rhel6pathes/april/ Give the yum_repository module a try: https://docs.ansible.com/ansible/latest/modules/yum_repository_module.html

Re: [ansible-project] Yum update on multiple hosts but using a cusom repo file

2020-04-22 Thread Quad Zero
Hi Vivek, On each machine, I would run yum update on it. My repo file points to the server http://192.168.0.5/rhel6pathes/april/ Thank you. On Wed, Apr 22, 2020 at 3:06 PM Vivek Kothawale wrote: > Hi > Could you please let me know how you doing it in manually ? > > Thanks > Vivek > > On Wed,

Re: [ansible-project] Need help for some logic

2020-04-22 Thread Rahul Kumar
In short , I want this configuration file as an interface between mymasterplaybook.yml and individual roles , also mymasterplaybook.yml need to recognize this file to fill its dynamic params . Rahul On Wed, 22 Apr 2020 at 13:28, Rahul Kumar wrote: > Thanks stefan ! > My question how i can take

Re: [ansible-project] Need help for some logic

2020-04-22 Thread Rahul Kumar
Thanks stefan ! My question how i can take these 3 dynamic values as a configuration file which comes with each role. Example: I want to invoke mymasterplaybook.yml for 10 roles , so i invoke this playbook as >ansible-playbook -i inventory.yml mymasterplaybook.yml -> This invocation could be

Re: [ansible-project] Need help for some logic

2020-04-22 Thread Stefan Hornburg (Racke)
On 4/22/20 9:35 AM, Rahul Kumar wrote: > Hi Ansible Gurus, > I have below playbook in one git repository:  mymasterplaybook.yml > - name: Do some test >       include_role: >         name: mytestrole >         tasks_from: test-server-names >       when: "'testing-group-name' in group_names"` > >

[ansible-project] Need help for some logic

2020-04-22 Thread Rahul Kumar
Hi Ansible Gurus, I have below playbook in one git repository: mymasterplaybook.yml - name: Do some test include_role: name: mytestrole tasks_from: test-server-names when: "'testing-group-name' in group_names"` Now I invoke above playbook with a existing role named