Re: [ansible-project] Does get_url prevent caching?

2016-08-10 Thread Richard James Salts
On 03/02/16 12:58, Joshua J. Kugler wrote: I am trying to download some ISOs to multiple machines (via a proxy to conserve bandwidth). The ISO is being stored by the proxy, and the machine is using the proxy, but it is downloading from the upstream source every time. Squid is showing in its

Re: [ansible-project] Running Python script, running into /usr/bin/env: No such file or directory

2016-08-10 Thread Brian Coca
Ansible attempts to execute in a non interactive manner to avoid a slew of errors, part of this can affect the environment loaded, in many cases .bashrc or similar files are not loaded. After fact gathering, use this to find out what the environment that Ansible sees is: - debug: var=ansible_env

[ansible-project] Re: Developing playbooks on Windows

2016-08-10 Thread Brian Jackson
Thanks Jon for the help. I've settled on a combo of two things: 1. Test Kitchen for developing playbooks. Neill Turner's Ansible Provisioner works great on Windows since it uses Vagrant and handles running Ansible within the Linux VM: https://github.com/neillturner/kitchen-ansible 2. A local

[ansible-project] Re: Starting a Background Java Process on Windows

2016-08-10 Thread Matt Davis
You're partially right: it's not Ansible, but WinRM that's killing the process. WinRM runs everything under a Windows job object, and that job object gets terminated when the connection is closed (ie, when Ansible finishes that task), which causes all processes spawned under it to be

Re: [ansible-project] Re: simple true/false statements in playbooks

2016-08-10 Thread Kai Stian Olstad
On 11. aug. 2016 00:26, skinnedknuckles wrote: Thanks for the tip. But it is still evaluating as true when it should be false. Then you need some debugging to see the content of the variable. - name: GET AGE OF DATABASE ADS800DICE.S3DB ON SHARE script: minutesSinceAccess.ps1

Re: [ansible-project] Does get_url prevent caching?

2016-08-10 Thread Andrew Edelstein
While I'd be interested to know the answer to this as well, why don't you just download the ISO to a local machine, then have your Ansible play grab the ISO from that machine? On Tue, Feb 2, 2016 at 7:58 PM, Joshua J. Kugler wrote: > I am trying to download some ISOs to

[ansible-project] Re: simple true/false statements in playbooks

2016-08-10 Thread skinnedknuckles
Thanks for the tip. But it is still evaluating as true when it should be false. - name: GET AGE OF DATABASE ADS800DICE.S3DB ON SHARE script: minutesSinceAccess.ps1 "{{uncServer}}" "{{path/ADS800Dice.s3db}}" "seagate\{{userName}}" "password" register: result - set_fact:

Re: [ansible-project] simple true/false statements in playbooks

2016-08-10 Thread Kai Stian Olstad
On 10. aug. 2016 23:31, skinnedknuckles wrote: I'm trying to display an error message if the file ADS800Dice.s3db has not been modified for more than an hour. The problem in in the last line. If I leave the quotes around the number 60, it gives me a false negative (evaluates to true when

[ansible-project] simple true/false statements in playbooks

2016-08-10 Thread skinnedknuckles
Management Node: - CentOs 7.1 - Ansible 2.1 Remote Node: - Windows 7 - Powershell 3.0 I'm trying to display an error message if the file ADS800Dice.s3db has not been modified for more than an hour. The problem in in the last line. If I leave the quotes around the number

[ansible-project] Starting a Background Java Process on Windows

2016-08-10 Thread Allen Fisher
Hello All-- I'm trying to get a couple of jars up and running in the background on some Windows machines. My expected result is at the end of the play I have both jars running with logs for both, and they're listening on ports and 24240 respectively. Here's my tasks: - raw: Start-Process

[ansible-project] Re: Windows and Groups

2016-08-10 Thread Allen Fisher
Hi Trond-- Thanks for the response. I was trying to figure out sub-groups yesterday thinking that may be the way to go. Allen On Tuesday, August 9, 2016 at 7:05:11 PM UTC-5, Allen Fisher wrote: > > Hello-- > > Fairly new to Ansible and am starting to really dig into what I can do > with it. I

[ansible-project] Re: Wacky SSH timeout bug with Ansible

2016-08-10 Thread Brandon Heller
On a whim, I tried setting pipelining to true, and found that it dramatically reduced the incidence of these issues, but still did not resolve them entirely. I still see examples of simple commands that take 60+1 seconds to complete. If anyone is seeing the same issues, definitely speak

[ansible-project] Re: How to install exe file on windows using ansible , e.g. firefox.exe

2016-08-10 Thread Trond Hindenes
The chocolatey module (win_chocolatey) can also install firefox. On Wednesday, August 10, 2016 at 3:34:01 PM UTC+2, Mike Fennemore wrote: > > I would try win_package as the alternative module for installing the exe. > > On Wednesday, August 10, 2016 at 3:10:49 PM UTC+2, Chandra Pandey wrote: >>

[ansible-project] Re: Replace host name in yml file

2016-08-10 Thread Anushri Mishra
omg never thought of that :) thanks !! On Wednesday, August 10, 2016 at 1:43:59 PM UTC-4, Anushri Mishra wrote: > > hi I have a question this is my main.yml file content: > > - name: Start Tomcat > > #service: name=tomcat7 state=restarted enabled=yes > > command: wget >

Re: [ansible-project] Replace host name in yml file

2016-08-10 Thread Dick Davies
That command is going to run on the tomcat server, so you probably can just use 127.0.0.1 On 10 August 2016 at 18:43, Anushri Mishra wrote: > hi I have a question this is my main.yml file content: > > - name: Start Tomcat > > #service: name=tomcat7 state=restarted

[ansible-project] Replace host name in yml file

2016-08-10 Thread Anushri Mishra
hi I have a question this is my main.yml file content: - name: Start Tomcat #service: name=tomcat7 state=restarted enabled=yes command: wget "http://admin:admin@*10.1.33.155*:8080/manager/text/stop?path=/externaluserwebapi; -O - -q become: True become_method: sudo

[ansible-project] Re: Ansible GUI

2016-08-10 Thread Anushri Mishra
ok.Thanks all. On Tuesday, August 9, 2016 at 6:07:10 PM UTC-4, Anushri Mishra wrote: > > hi, > > are there any suggestions for ansible-gui? I know there is ansible tower > but I dont want to pay. > > I was looking for ansibleworks awx but couldnt find any download link or > any thing. > >

[ansible-project] Re: Connection issues to Windows Server - Host not Reachable

2016-08-10 Thread Anfield
I thought the ping all command would literally ping all hosts. Anyway I tried -> ansible 10.10.128.0 -m win_ping, and I think this looks good 10.10.128.0 | *SUCCESS* => { "changed": false, "ping": "pong" } -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] Connecting to Windows Host Failing - (Fails Ansible Ping)

2016-08-10 Thread Dick Davies
The ping: task uses SSH - use http://docs.ansible.com/ansible/win_ping_module.html (disclaimer: I manage 0 windows hosts) On 9 August 2016 at 19:35, Anfield wrote: > Connecting from ansible to windows hosts I am getting the following error > when I run this command > >

[ansible-project] Re: Connection issues to Windows Server - Host not Reachable

2016-08-10 Thread Mike Fennemore
You used the ping module which is built for Linux systems. Try win_ping instead. -- 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] Re: Running shell command in Ansible

2016-08-10 Thread Kai Stian Olstad
On 10. aug. 2016 16:57, Enjoy The Silence wrote: I've made some changes in the script. I still need some help with the script. Here is the updated code. - name: Get Hitachi Devices device details shell: lsscsi | grep HITACHI | awk '{print $6}' register: hitachiDevice - name: Check

Re: [ansible-project] Re: Simple cisco IOS show version

2016-08-10 Thread Peter Sprygada
See example here: https://gist.github.com/privateip/11b042e569585ee9248a On Wed, Aug 10, 2016 at 11:12 AM, pixel fairy wrote: > start with > > - hosts: routers > vars: > ... > tasks: > ... > > > > On Wednesday, August 10, 2016 at 7:32:23 AM UTC-7, Bharath

Re: [ansible-project] Using dynamic variables with Ansible pull

2016-08-10 Thread Kai Stian Olstad
On 10. aug. 2016 16:28, Sam Sen wrote: I have a role that pulls in the correct variable depending on the type of server (eg web vs perl). If I set the variable within an inventory file, I can't get my task to access the variable in question. I think my issue is the FQDN isn't being used. #

[ansible-project] Re: Simple cisco IOS show version

2016-08-10 Thread pixel fairy
start with - hosts: routers vars: ... tasks: ... On Wednesday, August 10, 2016 at 7:32:23 AM UTC-7, Bharath Bharadwaj wrote: > > Hi All, > > I'm new to Ansible and yml, my goal is to automate a part of network > operation, I just want to start with a very simple output, copied

[ansible-project] Re: Using the wait_for module to check if the VM is up and running

2016-08-10 Thread Chethan S
I still get a similar error - The error was: 'dict object' has no attribute 'ansible_host'\n\nThe error appears to have been in '/var/lib/awx/projects/vms/waitcheck.yml' On Wednesday, 10 August 2016 19:56:45 UTC+5:30, Mike Fennemore wrote: > > Perhaps try ansible_host instead of

[ansible-project] Re: Connection issues to Windows Server - Host not Reachable

2016-08-10 Thread Anfield
> > Thanks for the update. I created the group_vars and added the windows.yml >> in there/ Tried an ansible all -m ping - and get the following error >> > On the linux control machine when I look at the python version it is 2.7.5, do I need to update that? Error msg - Loaded callback

[ansible-project] Re: Running shell command in Ansible

2016-08-10 Thread Enjoy The Silence
I've made some changes in the script. I still need some help with the script. Here is the updated code. - name: Get Hitachi Devices device details shell: lsscsi | grep HITACHI | awk '{print $6}' register: hitachiDevice - name: Check if the volume is partitioned shell: ls -l "{{

[ansible-project] Re: Connection issues to Windows Server - Host not Reachable

2016-08-10 Thread Mike Fennemore
There are two ways of approaching it, either put the connection details into the inventory or create a group_vars folder with your windows.yml file in it. Keep in mind that the group_vars folder needs to be at the same level as your inventory file. So for instance if your hosts file is at

[ansible-project] Re: silly trick: you can use variables in the "- name:" part of a playbook

2016-08-10 Thread Josh Smift
pf> i realize itfits how yaml and jinja2 works so probably obvious to many of pf> you. never thought about it until after doing this and seeing the result. pf> could make for more readable output. AN> example please, didn't get it. Thanks Something like this: - name: "{{ action }} the

[ansible-project] Simple cisco IOS show version

2016-08-10 Thread Bharath Bharadwaj
Hi All, I'm new to Ansible and yml, my goal is to automate a part of network operation, I just want to start with a very simple output, copied below is my playbook, I'm trying to run a show version, but i'm getting error when executing the output, yet when i try the same yml script through yml

[ansible-project] Using dynamic variables with Ansible pull

2016-08-10 Thread Sam Sen
I have a role that pulls in the correct variable depending on the type of server (eg web vs perl). If I set the variable within an inventory file, I can't get my task to access the variable in question. I think my issue is the FQDN isn't being used. # Inventory file [web_servers]

[ansible-project] Re: Using the wait_for module to check if the VM is up and running

2016-08-10 Thread Mike Fennemore
Perhaps try ansible_host instead of ansible_ssh_host? On Wednesday, August 10, 2016 at 1:27:31 PM UTC+2, Chethan S wrote: > > I am trying to develop a simple playbook (which would later be used in > larger ones) to check if Windows VMs in the inventory are up and running. > > --- > - name:

[ansible-project] Re: Connection issues to Windows Server - Host not Reachable

2016-08-10 Thread Anfield
> > Using version 2.1.0.0 >>> >> Have not created group_vars/windows.yml. I just created windows.yml under the ansible directory. Do I need to create the group_vars directory first? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

[ansible-project] Re: silly trick: you can use variables in the "- name:" part of a playbook

2016-08-10 Thread Arbab Nazar
example please, didn't get it. Thanks On Wednesday, August 10, 2016 at 10:02:16 AM UTC+5, pixel fairy wrote: > > i realize itfits how yaml and jinja2 works so probably obvious to many of > you. never thought about it until after doing this and seeing the result. > could make for more readable

[ansible-project] Re: Connection issues to Windows Server - Host not Reachable

2016-08-10 Thread Justin Dugan
What version of ansible are you using? On Wednesday, August 10, 2016 at 9:27:21 AM UTC-4, Anfield wrote: > > Hi - any further thoughts? > > >> -- 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: Connection issues to Windows Server - Host not Reachable

2016-08-10 Thread Mike Fennemore
http://docs.ansible.com/ansible/intro_windows.html Note Ansible 2.0 has deprecated the “ssh” from ansible_ssh_user, ansible_ssh_host, and ansible_ssh_port to become ansible_user, ansible_host, andansible_port. If you are using a version of Ansible prior to 2.0, you should continue using the

[ansible-project] Re: How to install exe file on windows using ansible , e.g. firefox.exe

2016-08-10 Thread Mike Fennemore
I would try win_package as the alternative module for installing the exe. On Wednesday, August 10, 2016 at 3:10:49 PM UTC+2, Chandra Pandey wrote: > > ansible play book > > root@dev-mmadmin-lx01 playbooks]# cat win_firefox_install.yml > > > - name: install > hosts: wintestserverchandra > >

[ansible-project] Re: Connection issues to Windows Server - Host not Reachable

2016-08-10 Thread Mike Fennemore
You made mention of the windows.yml. Are you making use of group_vars? On Wednesday, August 10, 2016 at 3:27:21 PM UTC+2, Anfield wrote: > > Hi - any further thoughts? > > >> -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe

[ansible-project] Re: Connection issues to Windows Server - Host not Reachable

2016-08-10 Thread Anfield
Hi - any further thoughts? > -- 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, send

[ansible-project] Re: Ansible integration with Jfrog Artifactory

2016-08-10 Thread Marco van Dam
Hi Harindra, could you be more explicit? what are you trying to do? I use jFrog Artifactory too but always in combination with git. I store my playbook in Git (either GitHub or GitLab) and use Artifactory to get my artefacts from. in my case, my servers do not have internet access (regulator)

[ansible-project] Re: ansible & joomla

2016-08-10 Thread Marco van Dam
Jose, I was wondering if you already started creating this play? we might do it together? although Joomla is not the best app to automate with Ansible. Kind regards Marco Op woensdag 7 mei 2014 18:21:07 UTC+2 schreef José Manuel Moya Carballo: > > Hi everyone! > > I have been working with

[ansible-project] Re: How to install RHEL on mutiple nodes using ansible

2016-08-10 Thread Marco van Dam
just an idea, but why don't you try Hashicop Atlas (or even better Packer) to create an image which you can deploy using Ansible? We use it all the time. In combination with Vagrant you can share that image with your developers to. Marco Op woensdag 27 juli 2016 02:33:34 UTC+2 schreef PUJA

[ansible-project] Running Python script, running into /usr/bin/env: No such file or directory

2016-08-10 Thread SC
Hi All, Basically, I'm trying to run a python script on a host. I have a playbook that's using the script module and it works when I target Oracle Enterprise Linux 6.7. However, trying it against a Solaris host fails. This is peculiar to me because I can copy the python script to the Solaris

[ansible-project] Yum update with ansible

2016-08-10 Thread Leandro Gomes
How can I update a Redhat or Centos Server using yum module keeping the release version ? In my tests with update * the server goes from 6.5 to 6.8 relase, when I want to keep in the 6.5 relase. In the command line in normal way we execute* yum releasever=6.5 update * -- You received this

[ansible-project] How to install exe file on windows using ansible , e.g. firefox.exe

2016-08-10 Thread Chandra Pandey
ansible play book root@dev-mmadmin-lx01 playbooks]# cat win_firefox_install.yml - name: install hosts: wintestserverchandra tasks: - name: InstallFF win_msi: path=d:\install\Firefox.exe = It runs but doesn't install , logs below , please help

[ansible-project] Running shell command in Ansible

2016-08-10 Thread Enjoy The Silence
Hello, Lately, I've started to use Ansible. I'm trying to write a script that pass a device as a parameter, and then chain a star sign for it. For example, if the device name is */dev/sda*, i would like to count the count of line of the command: *ls -l /dev/sda*. *I get an error after running

[ansible-project] Re: Ansible GUI

2016-08-10 Thread Marco van Dam
Yes there is a GUI available. It is called Ansible Tower. Although you can get a licence for free (up to 10 machines) this is a paid GUI. the more servers you add to tower, the more you need to pay. This GUI provides you a couple of cool things. it connects you to an SCM where your

Re: [ansible-project] Ansible sunchronize module.

2016-08-10 Thread Kai Stian Olstad
On 09. aug. 2016 23:48, Amrit Bhandari wrote: I am using Ansible 2.1.0.0 in a FEDORA environment.I have a playbook which is supposed to run a Python script.The Python script generates directories and subdirectories in /tmp/data/ of the remote machines.What need to do now is : 1)tar

[ansible-project] How can I use ansible and ec2.py to manage multiple aws accounts

2016-08-10 Thread Josh Smift
If the main thing you need is to get inventory from multiple accounts, you might find ansible-quartermaster to be useful. You could probably use the 'includes' feature to call ec2.py multiple times, with different config files to use different AWS keys to access your different accounts.

[ansible-project] Using the wait_for module to check if the VM is up and running

2016-08-10 Thread Chethan S
I am trying to develop a simple playbook (which would later be used in larger ones) to check if Windows VMs in the inventory are up and running. --- - name: Check if VMs are up and running hosts: localhost tasks: - name: Pauses the workflow pause: minutes=2 - name: Wait

[ansible-project] Re: mysql_db won't use given password

2016-08-10 Thread Barry Kaplan
User error, but not so informative error message. My instance security group was not updated to have access to the database. -- 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,

[ansible-project] Re: Ansible 2.0.0.2 main.yml fails with "ERROR! no action detected in task"

2016-08-10 Thread Saurabh Joshi
Hi Daniel, I figured a workaround (it's sort of ugly), thanks anyways. But just to let you know this email chain was mentioned in one of Ansible's open defect - ansible/issues/15715 Thanks, Saurabh. On Friday, 11 March 2016 22:08:05 UTC+5:30,

[ansible-project] mysql_db won't use given password

2016-08-10 Thread Barry Kaplan
I have not run any plays with mysql_db since upgrading to 2.x. But now I keep getting TASK [Create mysql database] *** fatal: [10.0.192.187]: FAILED! => {"changed": false, "failed": true, "msg": "unable to find /root/.my.cnf. Exception message:

[ansible-project] Re: passing variables to other playbook on ansible 2.1.1.0

2016-08-10 Thread James Hong
after spending hrs on this and that, looks like its a bug somewhere in 2.1.1.0 I have updated to 2.2 devel and its is now passing the parameters correctly. Regards James H On Friday, 5 August 2016 22:32:28 UTC+10, James Hong wrote: > > Hi Everyone > > I've just updated my Ansible to 2.1.1.0

[ansible-project] How can I use ansible and ec2.py to manage multiple aws accounts

2016-08-10 Thread Bob Benson
I'm trying to use one control ec2 machine to manage multiple machines in different aws accounts. what is the best way to setup static or dynamic inventories hosts file and various access keys. struggling with the concept and setup for managing more that one aws environment with one control

Re: [ansible-project] Re: Ansible 2.0.0.2 main.yml fails with "ERROR! no action detected in task"

2016-08-10 Thread Daniel Osielczak
Hi Saurabh, I was told that this is not a bug, but a feature of Ansible 2.x I ended up rewriting the whole thing. Sorry I couldn't help more. Best regards, Dan Daniel Osielczak PGP Key:4096R/3EC320D0 Fingerprint: 4268 54CD 50FF 5465 DFC3 EA59 4350 D3BC 3EC3 20D0 2016-08-09