[ansible-project] Re: Nested variable

2018-05-23 Thread David Villasmil
Solved! - set_fact: hosted_zone_id: "{{ dns_results | json_query('HostedZones[?Name==`(lookup('vars', hosted_zone_name)).`].[Id]') | regex_replace ('/hostedzone/', '') }}" For future reference. Thanks David On Wednesday, May 23, 2018 at 10:04:16 PM UTC+2, David Villasmil wrote: > >

[ansible-project] Re: inventory_hostname in path to create directory with win_file grief..

2018-05-23 Thread Jordan Borean
Hi You seem to be close, one thing to remember when dealing with Windows paths in double quotes is that you needs to properly escape the backslashes. E.g. your path could be one of the following (they all are the same after yaml parsing) # when not using quotes, no need to escape anything

[ansible-project] Nested variable

2018-05-23 Thread David Villasmil
Hello guys, I've got this set_fact: hosted_zone_id: "{{ dns_results | json_query('HostedZones[?Name==`mydomain.com.`].[Id]') | regex_replace ('/hostedzone/', '') }}" But i want to get the id from any of my domains, so i want to use a variable: hosted_zone_name: "mydomain.com" and do

[ansible-project] Re: Ansible ping to Windows fails with credssp , “Session' object has no attribute 'merge_environment_settings”

2018-05-23 Thread Jordan Borean
Yep as stated in the post linked above, you have a system version of requests that is too old for pywinrm, please run "*pip install requests --upgrade --force-reinstall*" to make sure you are reinstalling the latest version from pip. Thanks Jordan -- You received this message because you

[ansible-project] Re: route53 alias_hosted_zone_id

2018-05-23 Thread David Villasmil
Nevermind, layer 8.. my mistake, i will open a new one On Wednesday, May 23, 2018 at 8:39:24 PM UTC+2, David Villasmil wrote: > > Hello guys, > > I can use like: > > # >> Create the DNS load balancer to the instances > - name: Creating DNS load balancer > route53: > command: create

[ansible-project] password variable scope for delegate_to

2018-05-23 Thread Tod Detre
Hello all, I have a password I need to have on a delegate_to task, but I don't really want it passed to the other hosts. Is there a way to do this? I've tried setting the variable in a group_vars for the machine the task is delegated to, but it doesn't load those variables, just the ones for

[ansible-project] inventory_hostname in path to create directory with win_file grief..

2018-05-23 Thread William Dossett
Hi, I thought I had this project nailed and then they tell me they need a directory created called: c:\working\hostname where hostname is the name of the computer... I thought I could use: - name: make working dir win_file: path: "c:\working\{{ inventory_hostname }}"

[ansible-project] Re: Quick way for testing new Ansible roles

2018-05-23 Thread Mischa ter Smitten
Have a look at some of our roles https://github.com/Oefenweb?tab=repositories. They are all tested on Travis CI and contain a Vagrantfile for manual testing. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group

[ansible-project] Re: Quick way for testing new Ansible roles

2018-05-23 Thread Behrang
Thanks Mischa. I ended up doing something similar with Vagrant. - Created a symlink from the tests/roles dir to the root dir of the role I am writing - Installed the *vagrant-hostupdater* to add a custom host name to the Vagrant box I use for testing - Updated the inventory and

[ansible-project] Re: convcert tags dict tags list?

2018-05-23 Thread Karl Auer
I figured it out. Given a set of tags in a dict as per usual, this generates a variable all_tags which is a list of tags: - set_fact: tag_list: [] - set_fact: tag_list: "{{ tag_list + [ {item.key: item.value} ] }}" with_dict: "{{ all_tags }}" The "tags" attribute in the ec2_asg

Re: [ansible-project] Can't login Aix machine by the account that was created by Ansible user module.

2018-05-23 Thread Kai Stian Olstad
On 24.05.2018 03:52, shaolon...@hotmail.com wrote: Thanks Werner for your quickly response, I manual create a new user "raytest" and set password to "123456". I don't find the crypted password of the new user match the format that you mention. Do you help find the crypt method? Thanks. The

[ansible-project] Re: Nested variable

2018-05-23 Thread David Villasmil
Spoke too soon... That doesn't work either... On Wednesday, May 23, 2018 at 10:04:16 PM UTC+2, David Villasmil wrote: > > Hello guys, > > > I've got this set_fact: > > hosted_zone_id: "{{ dns_results | > json_query('HostedZones[?Name==`mydomain.com.`].[Id]') | regex_replace > ('/hostedzone/',

Re: [ansible-project] Can't login Aix machine by the account that was created by Ansible user module.

2018-05-23 Thread Mauricio Tavares
On Wed, May 23, 2018 at 8:24 AM, Werner Flamme wrote: > shaolon...@hotmail.com [23.05.2018 13:24]: >> Hello everybody, >> >> I am using Ansible user module to create Aix machine account. I found >> that the new created user can't login Aix machine. >> >> The below

Re: [ansible-project] Can't login Aix machine by the account that was created by Ansible user module.

2018-05-23 Thread Mauricio Tavares
On Wed, May 23, 2018 at 7:24 AM, wrote: > Hello everybody, > > I am using Ansible user module to create Aix machine account. I found > that the new created user can't login Aix machine. > > The below is my some test step; > 1. Generate a crypted password by

Re: [ansible-project] Can't login Aix machine by the account that was created by Ansible user module.

2018-05-23 Thread Werner Flamme
shaolon...@hotmail.com [23.05.2018 13:24]: > Hello everybody, > > I am using Ansible user module to create Aix machine account. I found > that the new created user can't login Aix machine. > > The below is my some test step; > 1. Generate a crypted password by ansible provided

Re: [ansible-project] Creating VM from Template is Failing

2018-05-23 Thread BIJAY PARIDA
Please check the indentation after the line "ip" - 28 and 29 -Bijay On Wed, May 23, 2018 at 9:39 AM, Gowtham Nakulan wrote: > SUMMARY > > We are trying to create VM from template. > I am facing issue at assigning ip line. > ISSUE TYPE > >- Documentation Report > >

[ansible-project] lookup not working

2018-05-23 Thread David Villasmil
Hello guys, i'm trying to use a variable inside a variable. https://pastebin.com/QmRX3jmz lookup SHUOLD work but it doesn't... can anyone help? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

[ansible-project] Re: Nested variable

2018-05-23 Thread Jordan Borean
Try this - set_fact: hosted_zone_id: "{{ dns_results | json_query('HostedZones[?Name==' ~ lookup('vars', hosted_zone_name) ~ '].[Id]') | regex_replace('/hostedzone/', '') }}" You need to escape outside of the quoted arg of json_query and then run the lookup. Note I haven't tested this

[ansible-project] lookup not working

2018-05-23 Thread David Villasmil
Hello guys, i'm trying to use a variable inside a variable. https://pastebin.com/bu5BuM4y lookup SHUOLD work but it doesn't... can anyone help? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

Re: [ansible-project] Can't login Aix machine by the account that was created by Ansible user module.

2018-05-23 Thread shaolong_t
Thanks Mauricio for your quickly response, I sure the user is created successful, because I can grep the user name from /etc/passwd. Also, I can transfer the user successful from root by "su *** -" command. I checked the /etc/security/passwd, I can see the origin crypted password in the

[ansible-project] Can't login Aix machine by the account that was created by Ansible user module.

2018-05-23 Thread shaolong_t
Hello everybody, I am using Ansible user module to create Aix machine account. I found that the new created user can't login Aix machine. The below is my some test step; 1. Generate a crypted password by ansible provided method. The cleartext password is "123456"

[ansible-project] how to deploy vmware from template with ansible: changing the local user, expanding the disk and identifying when sysprep is completed.

2018-05-23 Thread Josu Vilda
After several weeks searching for information and getting it, I give you the playbook. Feel free to answer to improve it or show me the faults After several weeks searching for information and getting it, I give you the playbook. Feel free to answer to improve it or show me the faults --- -

[ansible-project] Re: how to deploy vmware from template with ansible: changing the local user, expanding the disk and identifying when sysprep is completed.

2018-05-23 Thread Josu Vilda
requires GOVC https://github.com/vmware/govmomi/releases El miércoles, 23 de mayo de 2018, 15:52:40 (UTC+2), Josu Vilda escribió: > > After several weeks searching for information and getting it, I give you > the playbook. > Feel free to answer to improve it or show me the faults > > After

[ansible-project] convcert tags dict tags list?

2018-05-23 Thread Karl Auer
For some reason, the ec2_asg module does not handle tags the same way as other modules. Most modules let you do this: tags: fred: wilma barney: betty In the ec2_asg module, that results in an error message about not being able to convert a dict to a list. In the ec2_asg module, I have

[ansible-project] Re: Ansible ping to Windows fails with credssp , “Session' object has no attribute 'merge_environment_settings”

2018-05-23 Thread 'J Hawkesworth' via Ansible Project
Sounds like you have the issue described here: https://groups.google.com/forum/#!topic/ansible-project/ez68TZQciXE On Monday, May 21, 2018 at 8:51:57 PM UTC+1, Harshit Srivastava wrote: > > I have configured Ansible on my ubuntu 14.04 and my target machine is a > windows server 2016, but it

[ansible-project] route53 alias_hosted_zone_id

2018-05-23 Thread David Villasmil
Hello guys, I can use like: # >> Create the DNS load balancer to the instances - name: Creating DNS load balancer route53: command: create zone: "{{ domain }}" value: "{{ cluster }}-{{ item }}.{{ domain }}" alias: true alias_hosted_zone_id: "KLAIUDIAUHSINUD"

Re: [ansible-project] Find module with contains parameter not working

2018-05-23 Thread Saranya N
Thank you so much Kai , that worked . -- 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 post to this group,