Re: [ansible-project] reading from files

2017-12-12 Thread coach rhca
Thanks Kai for the help always..will check on this ... On Tue, Dec 12, 2017 at 11:04 PM, Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On Tuesday, 12 December 2017 07.28.53 CET coach.r...@gmail.com wrote: > > Hi, > > > > Trying to read the values from flat files and to use it as a

[ansible-project] Ansible 2.4 gathering facts stuck

2017-12-12 Thread Mona Gopal
Hi, Ansible2.4 is setup on CentOS7.4. The playbook execution gets stuck(for more than 5 mins) at gathering facts at times and few of the times it runs smoothly. What could be the reason for it? Regards, Mona G -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] Templete statement that can qualify mulitiple inventory_hostname

2017-12-12 Thread Kai Stian Olstad
On 12.12.2017 23:56, Mike Johnston wrote: *hosts file:* [group1] system1 system2 system3 roles/fubar/templates/mytest.j2 {% if inventory_hostname == "server1" %} This is a test {% endif %} This works... but what if I want this line on server1 and server3? Preferably something a role assigned

[ansible-project] Ansible AWS EC2 create scripts gives this error:: "Timeout when waiting for 172.31.25.6:22"}

2017-12-12 Thread Ajay Sharma
My Ansible AWS EC2 instance creation script gives this error. "Timeout when waiting for 172.31.25.6:22"} to retry, use: --limit @/root/instance/provision-ec2.retry this code is causing problem, Please let me know, how to solve this. *- name: Wait for the instances to boot by

[ansible-project] Integrate ansible in CI/CD tools

2017-12-12 Thread Helio Campos Mello de Andrade
Hi guys, - I'm trying to integrate an ansible playbook with my CI/CD tool (GOCD https://www.gocd.org/). It happens I have to pass a complex data structure (a hash with lists of hashes) to it and don't know how to do it. As almost all information in this hash are secrets and login stuff, I'm

[ansible-project] Re: WinRM configuration script

2017-12-12 Thread Maverick Sevmont
Thanks Trond and Matt! I just saw your reply, never got any kind of notification from google!!! I thought I had checked the box to send me the updates. I ended up building a script using PsExec to accomplish this, but currently I am into building UI tools for other folks, so I will definitely

[ansible-project] Re: Not repeatable login error with winrm

2017-12-12 Thread Jordan Borean
Actually after looking at the error it does still seem to be a fatal error so I don't think the block/rescue will work in this case so I think putting wait_for_connection after your reboot stage might be best. -- You received this message because you are subscribed to the Google Groups

[ansible-project] Re: Not repeatable login error with winrm

2017-12-12 Thread Jordan Borean
If the previous task before the copy one is to install some features and reboot then potentially the WinRM service comes back online but it reboots one more time that isn't caught. What I would potentially do is - name: install problematic features win_feature: name: ... register:

[ansible-project] Templete statement that can qualify mulitiple inventory_hostname

2017-12-12 Thread Mike Johnston
I'm trying to figure out how to pass statement that will match multiple hostnames instead of just one. I know how to do it with a group in the hosts file, but I need it to be something I set in the defaults part of the role. I'm sure sure the answer is really easy but I'm just getting used to

[ansible-project] Not repeatable login error with winrm

2017-12-12 Thread Justin M
New to Ansbile and trying to do a POC and learn at the same time. I'm using centos for my ansbile server and using the local admin account on windows when running my remote tasks. I'm able to run a bunch of tasks like remotely installing MSIs and joining a domain and installing some

[ansible-project] Add conditional logic to variable files?

2017-12-12 Thread Robert Flaugher
I've been using Ansible Galaxy roles from Jeff Geerling. In his Github READMEs he seems to say that you can override variable settings in his default/main.yml and vars/*.yml files by reproducing the desired settings in a /vars/main.yml file and then re-assigning them your desire values. This

Re: [ansible-project] Is there a way to print a report at the end of an ansible run?

2017-12-12 Thread Matt Martz
You could write a callback plugin that aggregates that data, and prints out on `v2_playbook_on_stats` similarly to the way the `PLAY RECAP` is output. On Tue, Dec 12, 2017 at 3:39 PM, wrote: > I have an ansible setup that generates a set of clusters and their >

[ansible-project] Is there a way to print a report at the end of an ansible run?

2017-12-12 Thread burton
I have an ansible setup that generates a set of clusters and their configuration. I want to print (locally) a report showing which services were deployed, what their credentials were, etc. debug won't work because the output it escaped so I get lots of \n\n ... a command with 'cat' won't

[ansible-project] SSL/Certificate errors when running playbooks against Azure

2017-12-12 Thread JOS
Hello, So I have an Azure free trial subscription and am trying to deploy VMs for it through ansible. For reference, I mostly followed this guide: https://github.com/erjosito/ansible-azure-lab I am unable to execute any playbook task at all, even something as simple as merely creating a

[ansible-project] SSL/Certificate Errors when running playbooks against Azure

2017-12-12 Thread JOS
Hello, So I have an Azure free trial subscription and am trying to deploy VMs for it through ansible. For reference, I mostly followed this guide: https://github.com/erjosito/ansible-azure-lab I am unable to execute any playbook task at all, even something as simple as merely creating a

[ansible-project] Starting nrpe client using ansible task

2017-12-12 Thread Varun Raj c v
I have written an ansible playbook to automate setup of nrpe 2.12 client which we use. The last step of the task is to start nrpe client as nagios user. ### starting nrpe - name: go to INIT.D and start nrpe become: yes become_user: nagios command: ./nrpe-server

Re: [ansible-project] Variable precedence and why to over rule ?

2017-12-12 Thread akazia . info
OMG! I complete over saw this. Thanks a lot! Am Dienstag, 12. Dezember 2017 20:57:03 UTC+1 schrieb Kai Stian Olstad: > > On Tuesday, 12 December 2017 20.46.26 CET akazi...@gmail.com > wrote: > > there is a quite simple setup I am sure many of us came across this: > > 1. you have lean, slim

Re: [ansible-project] Variable precedence and why to over rule ?

2017-12-12 Thread Kai Stian Olstad
On Tuesday, 12 December 2017 20.46.26 CET akazia.i...@gmail.com wrote: > there is a quite simple setup I am sure many of us came across this: > 1. you have lean, slim and dedicate Roles > 2. every role has its own role vars > 3. playbooks include the roles > > Up to this point nothing spezial >

[ansible-project] Variable precedence and why to over rule ?

2017-12-12 Thread akazia . info
Hello, there is a quite simple setup I am sure many of us came across this: 1. you have lean, slim and dedicate Roles 2. every role has its own role vars 3. playbooks include the roles Up to this point nothing spezial Now: lest assume you have an base path for an application, most likely you

Re: [ansible-project] reading from files

2017-12-12 Thread Kai Stian Olstad
On Tuesday, 12 December 2017 07.28.53 CET coach.r...@gmail.com 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 > > example.com/development/testcaseone:v99 > > I want to use

Re: [ansible-project] reading from files

2017-12-12 Thread coach rhca
i am trying to use the shell: cat testfile |sed 's/\//\n/g' and got the values in column wise ,could you please help as how i can get this values individually using register. On Tue, Dec 12, 2017 at 12:00 PM, coach rhca wrote: > just to add the flatfile is on a remote

Re: [ansible-project] End ansible

2017-12-12 Thread Kai Stian Olstad
On Tuesday, 12 December 2017 07.05.17 CET venkatesh rasipuram wrote: > 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

[ansible-project] archive module does not add all the matched files to destination archive file

2017-12-12 Thread Lokesh
I want to search for files modified last 1day and add them to archive. I dont see all the matched files added to the destination zip file but see only the last file in the zip ansible --version ansible 2.3.1.0 config file = /Volumes/Projects/dat/ansible/ansible.cfg configured module search

[ansible-project] Ansible power shell script failing on Ansible but completing on target machine

2017-12-12 Thread Josh Bergman
Hello, I have just started to use Ansible to complete some automation aspects on the Windows platform. My first task was to run our power shell script to install out Anti Virus software. I was able to achieve this by creating a bat file that calls the power shell script with psexec. The bat

[ansible-project] Re: Jinja2 Templating Example

2017-12-12 Thread starflighter . one
Hi, here are the official examples: https://github.com/ansible/ansible-examples/tree/master/language_features There are also templates. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving

[ansible-project] Get all groups from parent group

2017-12-12 Thread starflighter . one
Hi guys, I want to get all existent subgroups from a parent group. Example Playbook: --- - hosts: "test" tasks: - group_by: key: "{{ansible_distribution}}-{{ansible_distribution_major_version}}" parents: "dist" - debug: var="{{ groups['dist'] }}" run_once: true

[ansible-project] Re: ios_modules

2017-12-12 Thread SK
Have you been able to identify anything around this? I am trying to get Ansible to work on SG200 series switch and unable to. Is it supported? Thank you in advance! On Monday, April 3, 2017 at 10:27:21 PM UTC+8, Dave wrote: > > Hi All, > > I've got a question regarding the supported platforms