[ansible-project] Getting UUID of a VMware Virtual Machine using Ansible

2018-05-16 Thread Gowtham Nakulan
We are working on Ansible Environemt. We wanted to connect to a Newly Deployed VM using its UUUID. How to Get the UUID of a VMware Virtual Machine using Ansible so that i can establish the connection. -- You received this message because you are subscribed to the Google Groups "Ansible Pr

[ansible-project] Re: File copy/Create folder on Windows server based upon json output from Powershell

2018-05-16 Thread java_cat33
Updated - changed script to now add the two variables into a hashtable that is converted to json - assume this is the correct approach. This can be returned to the script_output registered in the play. On Thursday, May 17, 2018 at 4:49:07 PM UTC+12, java_cat33 wrote: > > Sorry - I've got another

[ansible-project] Re: File copy/Create folder on Windows server based upon json output from Powershell

2018-05-16 Thread java_cat33
Sorry - I've got another question(s) related to this. I've modified the PS script to return 2 x json outputs, each assigned to a different PS variable. Each output contains a different file name. Is it possible to return two outputs to the playbook ran off the task that runs the PS script? Can

[ansible-project] Re: ansible error with loops (with_items)

2018-05-16 Thread jeyyu2003
Kai, Thanks. Noted on the indentation. I was able to resolve this issue by using a different editor and manually updating all the quotes. It was able to execute successfully after that. - J. On Wednesday, May 16, 2018 at 3:06:07 PM UTC-5, jeyyu2003 wrote: > > Hi, I am trying to use Ansible to re

Re: [ansible-project] Send commands to a not supported router

2018-05-16 Thread Veera Kumar
Couple of ways we have, We can group Cisco and other vendor devices. Then we can add condition only when hostname matches with Cisco group will execute the command. On other devices this task will be slipped. Still you are not familiar with group concepts, then simply add ignore_errors: yes on th

[ansible-project] Send commands to a not supported router

2018-05-16 Thread Juan Manuel Fernandez
Hi! I'm a newbie to the ansible world. I want to generate a .yml file that send commands to a router. I try with routers cisco with the ios_command module and works fine but y want to do the same with other router of other provider and it's failed. Do you know a module that permit any commands wit

RE: [ansible-project] Re: Installing Java JRE on windows 2016 core

2018-05-16 Thread William Dossett
Thank you. The cfg file does specify all that and I did come to try something like you show below and got much larger error messages from ansible that I am trawling through…. Will also try the jdk to see if I get anything different. Appreciate you looking at it. Bill From: ansible

[ansible-project] Re: Installing Java JRE on windows 2016 core

2018-05-16 Thread Jordan Borean
Hi Without actually seeing the server itself I can't give you much but a quick Google search shows there is some compatibilities with the JRE and JDK resulting in the rc of 1603 https://www.ghacks.net/2015/06/26/fixing-java-update-did-not-complete-error-code-1603/. I've only installed the JDK

[ansible-project] Re: Waiting for OS customization to complete

2018-05-16 Thread Jordan Borean
One thing you can do is make the opening of the connection (SSH/WinRM) the last step of the customization. You then have a task that waits for the connection to open which would mean the setup is complete. Thanks Jordan -- You received this message because you are subscribed to the Google Gro

[ansible-project] Re: win_updates fail

2018-05-16 Thread Jordan Borean
I've raised a PR to fix this issue https://github.com/ansible/ansible/pull/40283, if you want you can try it out and see what is happening. Otherwise you can specify the log_path and it should show the error that occurred in the log file. Thanks Jordan -- You received this message because yo

[ansible-project] Re: Unable to install Windows Updates using Ansible 'win_update' Module

2018-05-16 Thread Jordan Borean
Found the issue and have raised a PR to fix it. If you can test it out that would be great https://github.com/ansible/ansible/pull/40283. Thanks Jordan -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

[ansible-project] Installing Java JRE on windows 2016 core

2018-05-16 Thread William Dossett
Hi, I had problems getting ansible to install java on a windows 2016 server... I started using the 64 bit version and then it worked fine. Now I am trying to do the same on 2016 server core and it fails with the 64 bit version... was kind of just hoping it would work, but after numerous failur

Re: [ansible-project] Different output from URI module on different ansible versions.

2018-05-16 Thread Kai Stian Olstad
On 16.05.2018 20:59, ca...@canta.com.ar wrote: Ended up creating an issue for this: https://github.com/ansible/ansible/issues/40278 My take on this is that is must be a bug. The documentation in Ansible 2.3 says this is a stable interface, but it's has clearly changed in 2.4. No change of th

Re: [ansible-project] ansible error with loops (with_items)

2018-05-16 Thread Kai Stian Olstad
On 16.05.2018 22:06, jeyyu2003 wrote: Hi, I am trying to use Ansible to reference a file to populate variables onto my mail playbook and having issues. Inline and using Jinja templates work but not with this specific configuration. Here's my main loop3.yml file # Add Servers - name: Add Serve

[ansible-project] ansible error with loops (with_items)

2018-05-16 Thread jeyyu2003
Hi, I am trying to use Ansible to reference a file to populate variables onto my mail playbook and having issues. Inline and using Jinja templates work but not with this specific configuration. Here's my main loop3.yml file # Add Servers - name: Add Server Objects from a loop hosts: dev_serve

[ansible-project] Re: win_updates fail

2018-05-16 Thread Jordan Borean
Looks like a typo in the code where it isn't retrieving the result code, simple fix https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/windows/win_updates.ps1#L240. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscri

[ansible-project] Re: Modify various groups if present

2018-05-16 Thread John Harmon
In short, can I combine these two tasks into one? Some servers have one group, some have another. None of the servers should have both: - name: Ensure GID is correct for gomer group group: name: gomer gid: 2001 when: getent_group | lower | search("gomer") - name: Ensure GID is corre

Re: [ansible-project] Different output from URI module on different ansible versions.

2018-05-16 Thread canta
Ended up creating an issue for this: https://github.com/ansible/ansible/issues/40278 -- 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] Re: Modify various groups if present

2018-05-16 Thread John Harmon
the missing underscores appear to have been whacked during copy/paste somehow. The gid/git typo was my fault. I didn't want to use lists though, as I plan on applying this to about 60 different servers. I wanted it to be intuitive enough to make the proper changes for the proper server. On W

[ansible-project] Re: Modify various groups if present

2018-05-16 Thread Nick Rogers
You may not need to use the getent module at all - the group module already uses groupmod if the group already exists. If you want to use getent, then it looks like you are missing '_' characters in the "when" conditions. They should be when: getent_passwd ... and when: getent_group ...

[ansible-project] Modify various groups if present

2018-05-16 Thread John Harmon
How would you approach modifying the gid of a group on a server only if it exists? I know I can do this for 3 groups within 3 separate tasks (as an example), but I was hoping to combine them into a single task (see last task below.). The problem with my current setup is that it may create

[ansible-project] Intended behavior of variable expansion in role handlers?

2018-05-16 Thread luciano . cavalheiro
Greetings, I found an unexpected behavior when role variables, with default values defined, are overwritten by role parameters in the playbook. I would like to confirm whether its a bug or working as designed before opening an issue on github. Here is the test case. I have defined a role to co

Re: [ansible-project] Different output from URI module on different ansible versions.

2018-05-16 Thread canta
Transcript from a quick chat on Freenode ansible's IRC channel: [12:56] Any clue on how can i force the URI module output format? [12:56] can you be more specific? [12:57] Sure. I was saying a few minutes ago: [12:57] I do a call to a login service, this service gives me a cookie, and the

[ansible-project] ec2 CPU optimizing options

2018-05-16 Thread Terry George
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html Is there current support in the ec2 module for CPU optimization yet? Basically you can customize the number of CPU cores and the number of threads per core at server launch. -- You received this message because you

Re: [ansible-project] sudo_exe deprecated in 2.8 use become_exe

2018-05-16 Thread Chris
Brilliant. I don't know how I missed that in the documentation. Thank you! On Wednesday, May 16, 2018 at 8:15:32 AM UTC-7, Kai Stian Olstad wrote: > > On 16.05.2018 16:54, Chris wrote: > > However there isn't any documentation related to become_exe. > > > https://docs.ansible.com/ansible/late

Re: [ansible-project] sudo_exe deprecated in 2.8 use become_exe

2018-05-16 Thread Kai Stian Olstad
On 16.05.2018 16:54, Chris wrote: However there isn't any documentation related to become_exe. https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-become-exe -- Kai Stian Olstad -- You received this message because you are subscribed to the Google Groups "Ansible

[ansible-project] Re: azure_rm_virtualmachine: error to import AzureRMModuleBase

2018-05-16 Thread Irfan Sayed
yes. I did that already and here is the output. [root@centos]# pip install packaging Requirement already satisfied (use --upgrade to upgrade): packaging in /usr/lib/python2.7/site-packages On Wednesday, May 16, 2018 at 4:33:57 PM UTC+2, Nick Rogers wrote: > Have you tried running > > pip i

[ansible-project] Re: azure_rm_virtualmachine: error to import AzureRMModuleBase

2018-05-16 Thread Nick Rogers
Have you tried running pip install packaging On Wednesday, May 16, 2018 at 8:43:06 AM UTC-5, Irfan Sayed wrote: > > please suggest. I m stuck > > On Wednesday, May 16, 2018 at 10:05:08 AM UTC+2, Irfan Sayed wrote: >> >> Hello, >> >> I am trying to create the azure VM using ansible module :

[ansible-project] User and Password while using the uri_module

2018-05-16 Thread zenghuimin666
Hi everyone! Is there any possibility for me to create a user for an application, for instance Rocket.Chat, with ansible? I was using uri_module. I tried to get the system info and login with ansible-playbook, which worked just fine for me. So basically I think it is possible to call the API

Re: [ansible-project] Re: Help me please. How can I get the output of the command?

2018-05-16 Thread Josu Vilda
thx. I will be attentive to solution *Josu Rodriguez Vilda* Consultant Skype:jrvilda P Before printing think about *environment* and *costs* 2018-05-16 15:56 GMT+02:00 Josh Smift : > Yeah, looks like not. :^( Searching at https://github.com/ansible/ > ansible/issues for "vmware_vm_shell", htt

[ansible-project] Re: Help me please. How can I get the output of the command?

2018-05-16 Thread Josh Smift
Yeah, looks like not. :^( Searching at https://github.com/ansible/ansible/issues for "vmware_vm_shell", https://github.com/ansible/ansible/issues/38320 looks like it might be related? On Wednesday, May 16, 2018 at 8:51:59 AM UTC-4, Josu Vilda wrote: > > I've tried that, but it gives me back the

[ansible-project] Re: azure_rm_virtualmachine: error to import AzureRMModuleBase

2018-05-16 Thread Irfan Sayed
please suggest. I m stuck On Wednesday, May 16, 2018 at 10:05:08 AM UTC+2, Irfan Sayed wrote: > > Hello, > > I am trying to create the azure VM using ansible module : > azure_rm_virtualmachine > document referred : > *https://docs.ansible.com/ansible/2.4/azure_rm_virtualmachine_module.html* >

[ansible-project] Re: Waiting for OS customization to complete

2018-05-16 Thread Josu Vilda
Do you know if there is any way to listen to the vmware events in the esx, to wait for xxx event? The events are displayed on the vSphere Client El mart

Re: [ansible-project] best way to go about dhcp

2018-05-16 Thread 'Larry Pescatore' via Ansible Project
Is there a module for dhcp scan? Sent from my iPhone. Please excuse any typos. > On May 16, 2018, at 4:43 AM, Jordan Borean wrote: > > Yes, DNS is what people normally use to resolve hostnames to IP addresses. > -- > You received this message because you are subscribed to a topic in the Googl

[ansible-project] Re: Help me please. How can I get the output of the command?

2018-05-16 Thread Josu Vilda
I've tried that, but it gives me back the same information. <> The problem is that vmware_vm_shell module does not return the output of the command. El martes, 15 de mayo de 2018, 3:40:26 (UTC+2), Josh Smift escribió: > > Why are you setting "verbosity: 3"? According to > http://docs.ansible.c

Re: [ansible-project] best way to go about dhcp

2018-05-16 Thread Jordan Borean
Yes, DNS is what people normally use to resolve hostnames to IP addresses. -- 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...@googleg

Re: [ansible-project] best way to go about dhcp

2018-05-16 Thread Richard Hector
On 16/05/18 04:56, lpescatore via Ansible Project wrote: > Hi, Posting a hypothetical.  > Since my windows environment relies on a hosts file with addresses in > said file,  > what do you do when your environment is dhcp? Like if the IPs keep > changing, whats to be done in the hosts file? So the

[ansible-project] azure_rm_virtualmachine: error to import AzureRMModuleBase

2018-05-16 Thread Irfan Sayed
Hello, I am trying to create the azure VM using ansible module : azure_rm_virtualmachine document referred : *https://docs.ansible.com/ansible/2.4/azure_rm_virtualmachine_module.html* *Actual error* TASK [azure_vm_cre