Re: [ansible-project] Module Suffix's and custom windows modules

2015-01-08 Thread Chris Church
I have an idea what's causing the problem, no fix yet. For now, you can define your tasks as follows and it will work: - name: install packages action: module: win_exe exe: 'C:\Users\admin_user\Downloads\myapp.exe' ArgumentList: '/w /S /v"/l*v \"C:\Users\admin_user\AppData\Local\Tem

Re: [ansible-project] Module Suffix's and custom windows modules

2015-01-08 Thread Chris Church
It should work without the suffix. However, I'm seeing the same issue with 1.8, 1.8.1 and 1.8.2. In my case, it works when using ansible to run an adhoc command, but not ansible-playbook: ansible -i inventory --module-path modules -m win_exe I'll see if I can figure out what's going on... On

Re: [ansible-project] include: "{{ ansible_os_family }}.yml" not working

2015-01-08 Thread Francisco Reyes
On Thursday, January 8, 2015 at 10:46:17 PM UTC-5, Tony Kinsley wrote: > > It looks like you are trying to dynamically include a task file. I am > pretty sure that is not possible. You can only dynamically include vars > files. > Thanks Tom. I thought it was possible from reading the URL I pos

[ansible-project] Has 1.8.2 fix the mount [Errno 17] File exists?

2015-01-08 Thread hce h
Hi, The error occurred when a a point has been mounted, it should just skip the process if the mount point has already been mounted. If I umount it first, it works. Has it been fixed in 1.8.2? https://github.com/ansible/ansible/issues/2484 -- You received this message because you are subscri

[ansible-project] Module Suffix's and custom windows modules

2015-01-08 Thread Tony Kinsley
I have a custom windows module that I have been using in my playbooks and I just went to update to the version 1.8.2 ( installed with pip ). I went to run a playbook that I run all the time and got this error: /usr/local/bin/ansible-playbook -i ./core/inventory.py --module-path ./modules/ ./main

Re: [ansible-project] include: "{{ ansible_os_family }}.yml" not working

2015-01-08 Thread Tony Kinsley
It looks like you are trying to dynamically include a task file. I am pretty sure that is not possible. You can only dynamically include vars files. I have always seen includes coupled with when statements when you need to conditionally include a task file. If you want to run multiple sets of

Re: [ansible-project] Customizing how 'su' is used?

2015-01-08 Thread Ian Whitney
Can not. This a battle that has come up before. Although it's a very different tool, I know that Capistrano I can override how it calls certain shell commands. Is such a thing possible in Ansible? If so, I could just turn all use of "su" into "sudo su" On Thursday, January 8, 2015 at 5:46:44 PM

Re: [ansible-project] Customizing how 'su' is used?

2015-01-08 Thread Michael DeHaan
There aren't any options for sudo + su together. Are you sure you can't just and skip the su'ing? On Thu, Jan 8, 2015 at 4:14 PM, Ian Whitney wrote: > Hi, > > I've been learning Ansible and have run into a behavior that causes > problems with the server setup here at work. I'm wondering if

Re: [ansible-project] Ansible tower setup fails (centos 6.5)

2015-01-08 Thread Michael DeHaan
Hi, Please ask Tower questions to supp...@ansible.com - this list is for the open source project. We'll be super happy to help you over there. Thanks! --Michael On Thu, Jan 8, 2015 at 6:33 PM, Guy Knights wrote: > I just tried to run the latest ansible tower setup (2.1.0) and it failed >

[ansible-project] Can Ansible automatically install and configure the logentries agent?

2015-01-08 Thread josh
I'm trying to create a playbook that automatically sets up the logentries agent on a server, and I was wondering if anyone know how this would be done, or has done this already. The instructions for downloading logentries in the terminal can be found here

[ansible-project] Customizing how 'su' is used?

2015-01-08 Thread Ian Whitney
Hi, I've been learning Ansible and have run into a behavior that causes problems with the server setup here at work. I'm wondering if there's a way to fix it. On our server I have to run certain commands as an admin user. But I can't just switch users with 'su superuser'. I have to execute su

[ansible-project] Ansible tower setup fails (centos 6.5)

2015-01-08 Thread Guy Knights
I just tried to run the latest ansible tower setup (2.1.0) and it failed installing redis with the following error: TASK: [packages_el | install yum repositories] ok: [localhost] => (item=http://download.opensuse.org/repositories/home:cedric-vincent/CentOS_Cent

Re: [ansible-project] handler is called in v1.8.2

2015-01-08 Thread hce h
I think the run_once may give me the trouble, after commented run_once it was called. To be honest, I am not quite clear why we added the run_once here as the code was referenced from some sample. - name: "Reload exports" command: exportfs -ra delegate_to: "{{ nfsserver }}" run_once: true

Re: [ansible-project] Re: results from a multi-item Ansible task lacks the 'stdout_lines' attribute in the returned data structure

2015-01-08 Thread Roman Revyakin
Hey Florian, Thanks for your support on this issue. I have meanwhile discovered that there is an alternative way to handle the output and format it to your liking by using callback plugins, here's a couple of good examples on how to use this feature: http://blog.cliffano.com/2014/04/06/hum

Re: [ansible-project] provisioning azure VMs with azure module

2015-01-08 Thread Jeffrey Liu
As well as the disk associated with the Linux VM is not deleted. On Thursday, January 8, 2015 1:59:28 PM UTC-5, Jeffrey Liu wrote: > > Another follow up, downgrading to v0.8.4 seems to allow the creation of a > linux VM, but it does not properly terminate. > The Linux VM is deleted, but the assoc

Re: [ansible-project] provisioning azure VMs with azure module

2015-01-08 Thread Jeffrey Liu
Another follow up, downgrading to v0.8.4 seems to allow the creation of a linux VM, but it does not properly terminate. The Linux VM is deleted, but the associated cloud service is not deleted. On Thursday, January 8, 2015 11:38:15 AM UTC-5, Jeffrey Liu wrote: > > Just an FYI, it seems that down

Re: [ansible-project] Re: SIGHUP sent using ansible ?

2015-01-08 Thread Tomasz Kontusz
Try sudo /etc/init.d/myservice start && sleep 2. Some services don't isolate themselves properly on time. Ansible drops the ssh session the millisecond it's not needed anymore, so those service might catch a SIGHUP. Florian Gysin napisał: >I seem to have the same issue when trying to start Webl

Re: [ansible-project] action for getting Digital Ocean keys

2015-01-08 Thread Paul Mackay
Hi Akos, I'd be interested to take a look, is it on Github? thanks paul On Wednesday, 7 January 2015 19:18:11 UTC, Akos Vandra wrote: > > Hi! > > I have build a digitalocean_facts module, which I intend to release once > it's cleaned up a bit. Can send it to you in its current form, if you're

Re: [ansible-project] PDF Documentation

2015-01-08 Thread Michael DeHaan
We generate the Tower docs via a different system - but yes, there is a PDF there. Just so it's clear that there isn't any favoritism, Tower users don't get any special PDF of ansible docs either, they are 100% the exact same docs :) I actually haven't looked into rst2pdf (which apparently suppor

Re: [ansible-project] Can ansible automate the last steps of setting up a Percona Xtra Cluster

2015-01-08 Thread Tomasz Kontusz
Jason Zhao napisał: >Hello guys, > >I'm new to Ansible. Could anyone please help me with my question? > >I'm trying to automate the entire process of setting up a 2-node PXC. >All >the package installation and file configuration work have already been >automated using ansible. But I'm stuck in

Re: [ansible-project] PDF Documentation

2015-01-08 Thread Mark Phillips
On Thursday, 8 January 2015 10:34:04 UTC+1, Stuart Budd wrote: > I do not think that the idea will fly at all well, especially when they > are paying for the product. > And when they pay for it (Ansible Tower) they get a PDF ... problem solved! :) -- You received this message because y

Re: [ansible-project] provisioning azure VMs with azure module

2015-01-08 Thread Jeffrey Liu
Just an FYI, it seems that downgrading the python azure library to v0.8.4 fixes the issue. I'll put a note into the github issue below as well. On Wednesday, January 7, 2015 4:05:57 PM UTC-5, Jeffrey Liu wrote: > > In Azure, there's a concept of a cloud service (sort of a container that > is c

Re: [ansible-project] Can ansible automate the last steps of setting up a Percona Xtra Cluster

2015-01-08 Thread Brent Langston
On Thu, Jan 8, 2015 at 2:16 AM, Jason Zhao wrote: > I would like to know if Ansible can control the command execution orders > between different nodes. The question is actually not specific to PXC, but > applies to other cluster applications where order matters. > Yes, this is trivial with Ansib

[ansible-project] Can ansible automate the last steps of setting up a Percona Xtra Cluster

2015-01-08 Thread Jason Zhao
Hello guys, I'm new to Ansible. Could anyone please help me with my question? I'm trying to automate the entire process of setting up a 2-node PXC. All the package installation and file configuration work have already been automated using ansible. But I'm stuck in the last steps. Here are the

[ansible-project] Re: results from a multi-item Ansible task lacks the 'stdout_lines' attribute in the returned data structure

2015-01-08 Thread Florian Gysin
*+ 1 for Romans issue.* I also find the output of debug to be highly irritating and the missing stdout_lines attribute on multi-item tasks void the only possible way of getting human readable output. On Thursday, February 20, 2014 10:48:20 PM UTC+1, Roman Revyakin wrote: > > Hi Michael, > > One

[ansible-project] Re: Conditionnal include and group_by in roles

2015-01-08 Thread dlundgren
I ran into the same problem and my playbooks ended up looking like this, not pretty to say the least. Since I primarily manage FreeBSD machines. I had to move quite a few of my roles to handle the singular Ubuntu system that exists. my-play.yml --- - hosts: all gather_facts: yes tasks:

[ansible-project] Re: SIGHUP sent using ansible ?

2015-01-08 Thread Florian Gysin
I seem to have the same issue when trying to start Weblogic server instances via the shell command (I have to use that for complicated reasons). After successfully starting the server Ansible sends a SIGHUP and the server shuts down again. :( On Wednesday, October 15, 2014 1:39:08 PM UTC+2, Ala

[ansible-project] Undefined variable behaviour

2015-01-08 Thread José Coelho
I'm having some issues with variables scope and behavior, simplifying the issue: I have two environments: - production - development which one with several machines and a common role, for example backups. A variable backup_jobs define which files should be backup and when, so in the produ

[ansible-project] Ansible task seems to start weblogic but doesn't

2015-01-08 Thread Florian Gysin
Hi all So far we have been using simple bash scripts to facilitate starting our Weblogic servers which run on Solaris zones. I am now in the process of trying to setup proper Ansible playbooks for the entire server setup and start. So far this works great, but now I hit a wall: I wrote a task w

Re: [ansible-project] Exception: host not found issue with v1.8.2

2015-01-08 Thread James Morgan
Ok im confused now. I've just spun up a docker container and isolated it and it doesn't error on v1.8.2 I will have to do more debugging to see what is in the environment / inventory on our dev servers that could cause this. James -- You received this message because you are subscribed to th

Re: [ansible-project] PDF Documentation

2015-01-08 Thread Michael DeHaan
Ansible evolves quickly, and we want to encourage people to be looking at new versions, understaning the new features, and getting the latest corrections to the documentation. Often when looking at module documentation you'll see a "new option added in 1.8" and say "Hey, I really need to consider

Re: [ansible-project] Exception: host not found issue with v1.8.2

2015-01-08 Thread James Morgan
Hi, If you look at the git example I created https://github.com/jamesdmorgan/ansible1.8.1_template_issue . ├── debug_log ├── README.md ├── roles │ └── env-debug │ ├── defaults │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ └── templates │ └── dumpal

[ansible-project] Re: Creating and distributing ssh keys

2015-01-08 Thread Mark Maas
Just to clarify: I want to create keys on three servers, and then distribute those keys amongst those same three servers. These servers will be deleted and created every day, and I want the keys to be new every day as well ;-) The public keys are there, they are available as variables, I just n

[ansible-project] Creating and distributing ssh keys

2015-01-08 Thread Mark Maas
Hi List, I got this little play to create ssh-keys on one set of machine, register that output and then distribute those keys to each other: - name: Generate root sshkey user: > name=root generate_ssh_key=yes ssh_key_bits=4096 ssh_key_comment="{{ ec2_id }}.{{ ec2_placement }}

Re: [ansible-project] PDF Documentation

2015-01-08 Thread Stuart Budd
Thank you for the replies. I think that the lack of PDF documentation is a bit disappointing and lets does a good product. I can not really recommend the client goes with this product and then has to produce their own offline PDF documents. I do not think that the idea will fly at all well, esp

Re: [ansible-project] Referencing Ansible Variables

2015-01-08 Thread Peter Mooshammer
Thank you guys!!! Peter On Thursday, January 8, 2015 1:12:31 AM UTC-8, Tom Bamford wrote: > > Hi Peter > > As Fred says, the variables are not in scope for both plays. You will need > to declare your variables such that both plays can see them. You could put > them into a separate file and refe

Re: [ansible-project] Referencing Ansible Variables

2015-01-08 Thread Tom Bamford
Hi Peter As Fred says, the variables are not in scope for both plays. You will need to declare your variables such that both plays can see them. You could put them into a separate file and reference it with vars_files in both plays, or you could pass them in as extra vars on the command line. You

Re: [ansible-project] Referencing Ansible Variables

2015-01-08 Thread Frédéric Badel
Hi Peter, IMHO it is because your variables are defined for the host “local” within your 1st play, the hosts group “launched” cannot know about variables defined for another group Hope this help. Fred On Jan 8, 2015, at 08:05 , Peter Mooshammer wrote: > Hi there, > > I am fairly new with

Re: [ansible-project] Same list from multiple vars-files consolidated

2015-01-08 Thread Tomasz Kontusz
Sebastian Gumprich napisał: >Thanks for your input. >I tried setting hash_behaviour to "merge" but this doesn't work. hash_behaviour only affects dictionaries > Even when >I put the two lists into one vars-file, only the last list will be >used. Repeated keys in a dictionary is implementati

Re: [ansible-project] handler is called in v1.8.2

2015-01-08 Thread Tom Bamford
Can you post some output? A handler will only be called if the task was considered changed. On 8 January 2015 at 05:56, hce h wrote: > Hi, > > I have a task to use notify statement to call the handler, but it did not > seem called. The output of tasks did not show the handler task. Should the >

Re: [ansible-project] Same list from multiple vars-files consolidated

2015-01-08 Thread Sebastian Gumprich
Thanks for your input. I tried setting hash_behaviour to "merge" but this doesn't work. Even when I put the two lists into one vars-file, only the last list will be used. But you mentioning naming the variable different gave me an idea. I'm using different variables in group_vars and host_vars no