[ansible-project] Re: Intermittent error "failed to resolve remote temporary directory from"

2016-02-16 Thread Jonas Kongslund
After further investigations I have come to believe that it relates to SSH connection reuse. After disabling any connection reuse I no longer encounter the error: ansible all -i hosts -m ping --ssh-extra-args="-o ControlMaster=no -o ControlPath=none -o ControlPersist=no" Doing this will of

[ansible-project] Re: Ansible expect module responses to all prompt with same value...

2016-02-16 Thread CD Truong
On Tuesday, February 9, 2016 at 12:05:57 PM UTC-6, CD Truong wrote: > > Hi, > > I ran into a problem with expect module response the same value to all > prompt. > > I have a task that execute a command and expecting four prompt the expect > module response to the first prompt correctly but

Re: [ansible-project] Dynamic Inventory

2016-02-16 Thread govindaraj
Hi Matt, How can i force openstack.py script to write IPv4 address? For some reason the JSON file has IPv6 address. "mesos_masters": [ "b9d2e61e-0653-4a1f-a472-c5f15a017eae", "ca8c9fc7-337f-4f92-baac-7fe41f6475ce", "a904e509-b4b1-479e-8137-17bb30b400c9" ], I tried the below and

Re: [ansible-project] Dynamic Inventory

2016-02-16 Thread govindaraj
Hi Matt, Here is the output from running openstack.py --list. Took a snippet of it. "interface_ip": "96.119.246.10", "key_name": "ssd-xplat", "metadata": { "cluster_name": "jenkins_mesos_master", "group": "mesos_masters",

[ansible-project] Re: Debugging Ansible 2 on Windows Server?

2016-02-16 Thread 'J Hawkesworth' via Ansible Project
The only time I've seen a raw really not produce any output was on ansible 1.9.4 where one of the command args contained a > - however the same problem doesn't occurr in 2.0. Does it fail instantly or after a second or two? Only thing other I can think of is to try the update to Windows

Re: [ansible-project] Dynamic Inventory

2016-02-16 Thread Matt Martz
Effectively ansible is calling that inventory like `./openstack.py --list` You would need to inspect the output to see what is available. You are specifying a hosts entry of `jenkins_mesos_slave_prod`, so the dynamic inventory would need to return that group for it to be used. On Tue, Feb 16,

Re: [ansible-project] Dynamic Inventory

2016-02-16 Thread govindaraj
Thanks Matt. How do i execute this dynamic inventory against my playbook? When i tried the below it says no hosts matches. #ansible-playbook jenkins_mesos_slave.yml -i openstack.py --limit jmesosslv-cmce-02p.sys.comcast.net Here is my playbook. How can i ensure my playbook can run against this

Re: [ansible-project] Dynamic Inventory

2016-02-16 Thread Matt Martz
The dynamic inventory scripts are supposed to be used in place of a ini formatted inventory. Instead of using `-i /path/to/ini/inventory` you would use `-i /path/to/openstack.py` To make that possible, the `openstack.py` file needs to be marked as executable. On Tue, Feb 16, 2016 at 4:05 PM,

[ansible-project] Dynamic Inventory

2016-02-16 Thread Govindaraj Venkatesan
Hi, Is there any script that we can use to construct dynamic inventory file for Openstack? I downloaded the script but it gives a JSON output. Does anyone have a script to convert JSON to update a inventory file with list of IP address? You can download the latest version of the OpenStack

[ansible-project] Re: Ansible 2.0.1 RC2 is available for testing

2016-02-16 Thread Slim Slam
Any rough estimate on a release date? J On Monday, February 15, 2016 at 3:12:02 PM UTC-6, James Cammarata wrote: > > Hi all, we're happy to announce the RC2 release candidate for Ansible > 2.0.1 is available and ready for testing. This RC2 continues to address > bugs found in the 2.0 release.

[ansible-project] Re: Debugging Ansible 2 on Windows Server?

2016-02-16 Thread Slim Slam
Windows 2008R2 is still a mystery. I'm using the stock AWS AMI with all updates applied and upped the PS RAM as I did for Windows 2012R2. Still, I get the same thing as before. How can it just fail with no output? I don;t see anything in the Windows event logs, but I could be missing

[ansible-project] Understanding ansible branching model

2016-02-16 Thread Michael Baydoun
Can anyone point me to a doc or site that details what branching model the ansible project is following? I'd like to better understand what I'm seeing in the github repository, and apply some of that to our internal workflow if appropriate and useful. -- You received this message because you

[ansible-project] Is there an index of common playbook directives?

2016-02-16 Thread Brad Smith
I'm looking for something like the module index pages, but with coverage of the shared directives that can be included in any play, e.g. name, sudo/become, when, register (bonus points for something that details all the properties of the object that register returns), etc. I see these

[ansible-project] Foreman integration with Ansible - release 0.3 - feedback appreciated

2016-02-16 Thread Daniel Lobato Garcia
Hi Ansible users! A while ago I opened a thread asking what would be interesting to do when integrating Foreman and Ansible (https://groups.google.com/forum/#!topicsearchin/ansible-project/foreman/ansible-project/VQ0hK68E3gQ A small group of people contacted me and have been using

[ansible-project] Re: Monitor Windows file (web.config) on servers

2016-02-16 Thread 'J Hawkesworth' via Ansible Project
Glad its working. I don't know why those other variable names might be failing. Perhaps worth checking your playbook is valid yaml. I like to use either notepad++ as it has YAML syntax hightlighting, or use www.yamlint.com to check for correctness. Jon On Tuesday, 16 February 2016 14:54:06

[ansible-project] Re: Monitor Windows file (web.config) on servers

2016-02-16 Thread Mark Matthews
Hi Jon Thanks for the quick response... Using the information you provided I did the following playbook below...and it worked perfectly. So for some reason when I tried to use the following variable names it kept failing...'web_stat_file', ''file_info', 'web_fileinfo' Will have to read

[ansible-project] Re: Monitor Windows file (web.config) on servers

2016-02-16 Thread 'J Hawkesworth' via Ansible Project
So, not quite sure what's going on here but... register just stores the output from the win_stat command in a variable with the name you've given it. So you need to do something with the contents of the variable - hence the debug in the example playbook above Also I think variable names can't

[ansible-project] Re: Running NSSM from copied executables on windows and avoid installing NSSM

2016-02-16 Thread 'J Hawkesworth' via Ansible Project
You will need to (temporarily) turn of UAC prompting for Adminstrator users then. You can change this using win_regedit HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System ConsentPromptBehaviorAdmin needs to 0 for it to be off, and 2 to be back on again. Hope this helps, Jon On

[ansible-project] Re: Monitor Windows file (web.config) on servers

2016-02-16 Thread Mark Matthews
Hi Jon Just want to ask a quick question... Tried to do the following with the web.config file but keep getting errors. ok: [10.10.3.170] => { "Web.config_fileinfo": "VARIABLE IS NOT DEFINED!" I the tried to run the following paybooks to get some variables for that file: --- - name:

[ansible-project] Re: Monitor Windows file (web.config) on servers

2016-02-16 Thread Mark Matthews
Hi Jon That is exactly what I was looking for!! Thank you so much for your quick response and help! Cheers Mark On Tuesday, February 16, 2016 at 10:25:31 AM UTC, Mark Matthews wrote: > > Hi > > What is the best way to monitor any changes made to a Windows file (Either > the web.config or

[ansible-project] failed connecting to remote host

2016-02-16 Thread Mahendra
Greetings, I am to connect few hosts but on few hosts i am get the following error bash-3.2# ansible app_servers -m shell -a "sudo uptime" -u user2 --ask-pass -k -K --sudo SSH password: SUDO password[defaults to SSH password]: host1.example.com | FAILED >> { "failed": true,

[ansible-project] Re: Running NSSM from copied executables on windows and avoid installing NSSM

2016-02-16 Thread ishan jain
Hi Jon, Indeed i am using the admin account to connect to the windows machine via ansible. Even when you are logged into the windows machine directly with the admin account, it would require you to again elevate the privileges to start as admin, so it is obvious we need additional steps to

[ansible-project] Re: Monitor Windows file (web.config) on servers

2016-02-16 Thread 'J Hawkesworth' via Ansible Project
Above looks good. You could try using win_stat, which returns a checksum and then do whatever is necessary if the checksum has changed. Something like the following --- - hosts: all tasks: - name: stat the hosts file win_stat: path: C:\windows\system32\drivers\etc\hosts

[ansible-project] VMware Template playbook options

2016-02-16 Thread Mark Matthews
Hi I am setting up a new VMware virtual machine from a template using a Ansible playbook. I want to be able to change the datastore and the network (vm_disk and vm_nic) of the VM during the setup of the VM. But when I add this information into the playbook (see below), nothing happens. The

Re: [ansible-project] Multiple instances of Ansible to deliver to production and non-production environments

2016-02-16 Thread Dick Davies
We run the same playbooks against 7 (!) various staging environments, with a different inventory for each. Per-environment config goes into the inventory under the [all:vars] key - including things like versions of RPMs etc. SSH credentials are managed out of band, but there's a central git repo

[ansible-project] Monitor Windows file (web.config) on servers

2016-02-16 Thread Mark Matthews
Hi What is the best way to monitor any changes made to a Windows file (Either the web.config or hosts file)? I want to be able to check that these files have not been changed at all, and if they have, Ansible picks that up and warns me and I can change it back to a template. I am currently

[ansible-project] Re: openstack os_project endpoint error

2016-02-16 Thread Scott
Thanks for reply. Tried settings as mentioned and now get is "The request you have made requires authentication. (HTTP 401) (Request-ID: req-3b396e91-c949-4956-b724-9b716c1f19df)". I know the user I'm using is OK because when I run the openstack cli using same credentials it works. I have