Re: [ansible-project] reading from files

2017-12-11 Thread coach rhca
just to add the flatfile is on a remote machine... On Tue, Dec 12, 2017 at 11:58 AM, wrote: > Hi, > > Trying to read the values from flat files and to use it as a variables in > the ansible playbook , for example > > the flatfile is > #cat output > >

[ansible-project] reading from files

2017-12-11 Thread coach . rhca
Hi, Trying to read the values from flat files and to use it as a variables in the ansible playbook , for example the flatfile is #cat output example.com/development/testcaseone:v99 I want to use above values as a variables in the playbook , just like --- - hosts: vars: rt1:

[ansible-project] End ansible

2017-12-11 Thread venkatesh rasipuram
HI team, I have my ansible play book. where I am running the yaml scripting sequentially (which mean run one after another host serial -1) As soon as I find the right host to set, I wanted to exit from the playbook and do not want to continue for further host. end_play will end the

[ansible-project] How to include startup script in instance template through ansible playbook

2017-12-11 Thread aashish . mishra
Hi, Please help me for how to include startup script in instance_template through ansible playbook. Regards Aashish -- *This message contains information that may be privileged or confidential and is the property of the Quantiphi Inc and/or its affiliates**. It is intended only for the

Re: [ansible-project] host variables in hosts file versus host variables in files within host_vars inventory directory

2017-12-11 Thread Jason S
It should have made it clear for anyone else reading that [hostname:vars] hostnamevar=hostnamevalue is never intended to work, but I had tried it. On Tuesday, 12 December 2017 14:19:24 UTC+11, Jason S wrote: > > Ah, thank-you Brian. > Now I have the variables next to the host definition (within

Re: [ansible-project] host variables in hosts file versus host variables in files within host_vars inventory directory

2017-12-11 Thread Jason S
Ah, thank-you Brian. Now I have the variables next to the host definition (within the group definition) it works fine, as expected. I'm trying to think why I missed this even though it was staring me in the face on the documentation page. I guess I was thinking that all variables would have to

Re: [ansible-project] INFO: Does each ansible task ssh before performing the task

2017-12-11 Thread Brian Coca
normally, several times -- -- Brian Coca -- 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

Re: [ansible-project] host variables in hosts file versus host variables in files within host_vars inventory directory

2017-12-11 Thread Brian Coca
[stable:vars] stable-1 http_port=80 maxRequestsPerChild=808 ^ this is defining a var named 'stable-1 http_port' , not http_port for stable-1 the format is: [groupname:vars] varname=value then you can use simply with: debug: var: varname or debug: var:

Re: [ansible-project] host variables in hosts file versus host variables in files within host_vars inventory directory

2017-12-11 Thread Jason S
I should have mentioned I have inventory = inventories/uat defined in my ansible.cfg or I'm running the playbook with -i inventories/uat (or both) On Tuesday, 12 December 2017 13:33:27 UTC+11, Jason S wrote: > > Hi Brian, > I got that via trial and error > I'm using ansible 2.4.2.0 > > In my

Re: [ansible-project] host variables in hosts file versus host variables in files within host_vars inventory directory

2017-12-11 Thread Jason S
Hi Brian, I got that via trial and error I'm using ansible 2.4.2.0 In my case I have an inventory setup like this inventories/uat/hosts inventories/uat/host_vars/stable-1 inventories/uat/host_vars/stable-2 inventories/uat/group_vars/stable in inventories/uat/hosts [stable] stable-1 stable-2

Re: [ansible-project] How to make -vvvv the default for ansible-playbook in ansible.cfg

2017-12-11 Thread Brian Coca
http://docs.ansible.com/ansible/devel/config.html#default-verbosity -- Brian Coca -- 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] Email & Jinja2 templates

2017-12-11 Thread Brian Coca
there is a template lookup http://docs.ansible.com/ansible/devel/plugins/lookup/template.html -- -- Brian Coca -- 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

Re: [ansible-project] host variables in hosts file versus host variables in files within host_vars inventory directory

2017-12-11 Thread Brian Coca
I'm not sure where you got `hostvars[inventory_hostname]['{{ inventory_hostname }} http_port']` but that does not look like a valid construct In any case, using: hostvars[inventory_hostname]['http_port'] hostvars[inventory_hostname]['maxRequestsPerChild'] you should be able to access the vars no

[ansible-project] host variables in hosts file versus host variables in files within host_vars inventory directory

2017-12-11 Thread Jason S
The inventory documentation describes setting some variables for a single host in a hosts file http://docs.ansible.com/ansible/latest/intro_inventory.html#host-variables [atlanta]host1 http_port=80 maxRequestsPerChild=808host2 http_port=303 maxRequestsPerChild=909 Continuing with that example,

[ansible-project] Re: winrm or requests is not installed: No module named winrm

2017-12-11 Thread Jordan Borean
Hi It's definitely possible to install the winrm requirements with Ansible, a few things to note regarding your outputs * Look at upgrading your host to a new version so that it at least has Python 2.7 installed by default (2.6 is old and not supported by Python itself but it should still

[ansible-project] Change credentials between hosts

2017-12-11 Thread Kevin Phillips
I have another unique use case I'm trying to work through with Ansible that I just can't seem to get working. I've got a play that configures a service on a system which depends on a change being made to another server (ie: log in to machine A to configure service, log in to machine B to allow

[ansible-project] Changing credentials between tasks

2017-12-11 Thread Kevin Phillips
Hi all. I was redirected here from the Ansible issue tracker on Github. I am having difficulties with a specific use case I'm hoping to get help with. I am trying to find a way to programatically change SSH credentials in an Ansible play between tasks and / or between hosts. Here is my most

[ansible-project] winrm or requests is not installed: No module named winrm

2017-12-11 Thread marcalfa1
Has anyone properly documented the correct packages that needs to be installed to manage a windows host? ansible 2.4.1.0 config file = /etc/ansible/ansible.cfg configured module search path = [u'/home/vagrant/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible

Re: [ansible-project] Win_reg_stat - set_fact problem with missing dict key

2017-12-11 Thread Gareth Stockdale
Thanks Kai. Apologise for the code presentation, I was typing from my phone. However your point 3 was the winner!  Thank you. -- 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

Re: [ansible-project] Run once with when statement causes only skipped action to run

2017-12-11 Thread ddrake2012
Thanks for the suggestion. This would be nice except I am using variable tag names defined in a config file, furthermore the tag names can't have underscores (a requirement of the AWS ELB module) only dashes so I don't even think I could map things even if it was possible to do something like

Re: [ansible-project] Win_reg_stat - set_fact problem with missing dict key

2017-12-11 Thread Kai Stian Olstad
On Monday, 11 December 2017 15.26.58 CET Gareth Stockdale wrote: > So new to ansible. I am using win_reg_stat to lookup registry keys to > ultimately uninstall some software. If the reg entry is found, myvar.value ( > after defining "register: myvar") contains the registry value. If it is not

[ansible-project] Win_reg_stat - set_fact problem with missing dict key

2017-12-11 Thread Gareth Stockdale
Hi So new to ansible. I am using win_reg_stat to lookup registry keys to ultimately uninstall some software. If the reg entry is found, myvar.value ( after defining "register: myvar") contains the registry value. If it is not found, that key is not defined in the myvar dict. Problem I

[ansible-project] Jenkins ansible

2017-12-11 Thread venkatesh rasipuram
HI team, I am writing ansbile scripting and I need to exit from the Jenkins build as and when the conditions met. what is the ansible command to exit from the jenkins build? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe