[ansible-project] Grouping of serial tasks

2015-05-13 Thread Abhishek Mukherjee
Sorry i'm relatively new to ansible so I may be asking a very obvious question :(. Basically my organization has servers in two tiers, and within those tiers there are groups. What I'm trying to make happen is an ansible syntax that will restart all of the one tier in parallel, but will only be

[ansible-project] Re: Ansible when condition not working with with_sequence

2015-05-13 Thread Rami Al-Ghanmi
I am facing a similar problem. Did you ever get this resolved? Thanks, Rami On Tuesday, March 10, 2015 at 2:52:14 PM UTC-7, Leonardo Visconti wrote: Hi everyone, I've been debugging some proof of concepts and got stuck with this. Whenever I use the when condition in conjunction with

[ansible-project] Callback plugin output; logging to ansible.log

2015-05-13 Thread J Hawkesworth
We use a couple of callback plugins and one of my colleagues has noticed that their output doesn't appear in ansible.log Is it possible to change this so we can see callback output? We're running 1.9.1 Many thanks, Jon -- You received this message because you are subscribed to the Google

[ansible-project] Clone VMs on vSphere

2015-05-13 Thread Marcel Bezemer
Hey, I am currently playing around with ansible to see if this could be used for us in production with our deployments. Something I am currently have trouble wrapping my head around is the following. I want to use ansible to deploy entire test invironment on the fly (tower button eventually).

[ansible-project] Not able to test variable after it is set in vars_prompt section to determine if I should execute the next prompt

2015-05-13 Thread richard . cardoza
--- - hosts: local gather_facts: no vars_prompt: - name: dest_env prompt: Enter the destination ENV to be installed (eg. dev, qa or default: prd)? default: private: no when: dest_env is not defined - name: src_env prompt: Enter the source ENV to use as

[ansible-project] Re: Build automation using ESXi, Ansible, Pysphere

2015-05-13 Thread Larry Smith
I recently just went through a similar process. I ended up deploying a TFTP server using Ansible which included the Ubuntu Netboot PXE boot image to provision new VMs. Using this method along with some shell scripts to help along the way has worked out great for me. I will also be uploading

[ansible-project] Re: Build automation using ESXi, Ansible, Pysphere

2015-05-13 Thread Larry Smith
Patel, Have you had any luck on this yet? I have gone down this path about a month or so ago. I am in the process of sharing back on the processes that I have come up with. Below is the flow. 1. Deploy TFTP server via Ansible which includes Ubuntu Netboot and configures all required services

[ansible-project] [FeatureRequest] Be able to get the resolved parameters in a module

2015-05-13 Thread Grégoire Pineau
Hello This mail follow-up an issue I opened on [GH](https://github.com/ansible/ansible/issues/10961). I will summary (on update) my issue here. In my company we have many different kind of server (applicationA, applicationB, rabbitmq, postgres, ) So have many roles and many playbook. We

[ansible-project] Re: Generating a sequence number

2015-05-13 Thread Evan Meagher
You could use a `local_action http://docs.ansible.com/playbooks_delegation.html` to shell out to some command that generates IDs [1]. This technique is often used to generate passwords in Ansible plays [2,3]. You could generate hostnames in the same way by simply restricting the alphabet of

Re: [ansible-project] Callback plugin output; logging to ansible.log

2015-05-13 Thread Brian Coca
Considering there are syslog callbacks I would be remiss to make this the default, but the callbacks themselves should be able to explicitly send data to ansible.log. -- Brian Coca -- You received this message because you are subscribed to the Google Groups Ansible Project group. To

Re: [ansible-project] Grouping of serial tasks

2015-05-13 Thread Serge van Ginderachter
There is no way to do such a thing properly, I'm afraid, but I have been wanting this feature myself. My use case is similar: I have lots of clusters, that are managed by the same setup type (the same roles), but deploy a different application (different inventory vars), and I'd like to deploy

Re: [ansible-project] Not able to test variable after it is set in vars_prompt section to determine if I should execute the next prompt

2015-05-13 Thread Brian Coca
when does not work with vars_prompt, only with tasks. -- 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] Callback plugin output; logging to ansible.log

2015-05-13 Thread Matt Martz
I would tend to say that should be the responsibility of the plugin. Ansible doesn't control what the plugin does, it only provides hooks for the plugin to execute. On Wednesday, May 13, 2015, J Hawkesworth j.r.hawkeswo...@googlemail.com wrote: We use a couple of callback plugins and one of my

Re: [ansible-project] Clone VMs on vSphere

2015-05-13 Thread Michael Peters
You can pass it as variable through the command line and then use a fail task to abort unless it's been set. That's how I've done similar things in the past. On Wed, May 13, 2015 at 3:37 AM, Marcel Bezemer mar...@beestig.nl wrote: Hey, I am currently playing around with ansible to see if this

Re: [ansible-project] Callback plugin output; logging to ansible.log

2015-05-13 Thread J Hawkesworth
Fair enough, a default would not seem right. I will modify my plugins. On Wednesday, May 13, 2015 at 1:07:34 PM UTC+1, Brian Coca wrote: Considering there are syslog callbacks I would be remiss to make this the default, but the callbacks themselves should be able to explicitly send data to

[ansible-project] Re: Clone VMs on vSphere

2015-05-13 Thread Mark Phillips
On Wednesday, 13 May 2015 12:39:27 UTC+1, Marcel Bezemer wrote: Hey, I am currently playing around with ansible to see if this could be used for us in production with our deployments. Something I am currently have trouble wrapping my head around is the following. I want to use ansible

Re: [ansible-project] backup location in template module

2015-05-13 Thread Vikas Kumar
Thank you Brian. I would look forward to have this feature. Regards, Vikas On Thursday, 14 May 2015 13:53:36 UTC+10, Brian Coca wrote: not yet, a couple of features we have been considering a)configurable 'backup depo' on target machine (/var/cache/ansible/backups) and/or backup up on

[ansible-project] Iterating over two tasks ?

2015-05-13 Thread Vikas Kumar
Hello All, I have two tasks and few yaml files. This is obviously not working as all the files (/etc/nginx/myconfigs/{ab01a,ab01b,ab,www}) have variables from *'**www.**yml',* which is the last item in the iteration. - include_vars: site_{{ item }}.yml with_items: site_files - name:

[ansible-project] Re: Double provisioning when running Ansible locally

2015-05-13 Thread Warren Seine
I found the issue. For some reason, ansible_ssh_host triggers this unexpected behavior here. Using the IP addresses as host instead worked fine for me. I rewrote my script to produce the following JSON: { local: { hosts: [ 192.168.42.42 ], vars: { hostname:

Re: [ansible-project] Re: include_vars and hash-behaviour

2015-05-13 Thread Brian Coca
So I looked and include_vars works by returning ansible_facts which bypasses, on purpose, hash merging as facts should overwrite themselves. The way this currently CAN work ... its not clear how we can use the merge,I'll add notes to the docs that include_vars always overwrites. -- Brian Coca

[ansible-project] Need help manipulating shell stdout data

2015-05-13 Thread David Reagan
I have a shell task that registers data that looks similar to: stdout_lines: [ username\tuserem...@domain.tld, username\tuserem...@domain.tld, username\tuserem...@domain.tld, username\tuserem...@domain.tld, ..., ] What I'd really like to end up with is a variable that

Re: [ansible-project] Re: include_vars and hash-behaviour

2015-05-13 Thread Michail Alexakis
Ok, i understand, seems that include_vars works like set_fact in this place. Thanks, Brian On Wednesday, May 13, 2015 at 10:22:47 PM UTC+3, Brian Coca wrote: So I looked and include_vars works by returning ansible_facts which bypasses, on purpose, hash merging as facts should overwrite

Re: [ansible-project] Re: bad PATH when running apt module

2015-05-13 Thread Brian Coca
sorry to say, I'm stumped here, i have not been able to reproduce your issue and really don't understand how it can happen with the information given. -- Brian Coca -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this

[ansible-project] Re: bad PATH when running apt module

2015-05-13 Thread Alex Peters
I hate bumping my own posts without contributing any more information, but I'm totally stuck on this issue and I can't progress without assistance. Can someone please provide me with some more direction towards resolving this problem? -- You received this message because you are subscribed to

[ansible-project] Re: Replacing dictionary key values

2015-05-13 Thread Adam Hamsik
Yes. Question is if it would be possible to write a module which would be able to do this. merge_val: orig=at_service.svc_state value=started P.S. I have had problems with this, too. Only solution with which I was able to come up was using filters to create new variable which is then later

[ansible-project] backup location in template module

2015-05-13 Thread Vikas Kumar
Dear All, I have below line from my ansible playbook which uses template http://docs.ansible.com/template_module.html module. - template: src=nginx_conf.j2 dest=/etc/nginx/nginx.conf backup=yes This works great, but create a backup in the same directory (/etc/nginx/ in this case). Is there

[ansible-project] Re: include_vars and hash-behaviour

2015-05-13 Thread Michail Alexakis
Hello Adam, I allready have set it to merge, actually that's the reason i posted this question (because it doesn't seem to merge). Have you tried the example above? I tested it under ansible==1.8.4. Maybe i am missing something obvious. On Wednesday, May 13, 2015 at 7:41:11 PM UTC+3, Adam

[ansible-project] Re: include_vars and hash-behaviour

2015-05-13 Thread Adam Hamsik
Have a look at hash_behaviour in ansible.cfg and set it to merge. But be aware that it's usually sign of bad design. On Tuesday, May 12, 2015 at 7:56:52 PM UTC+2, Michail Alexakis wrote: Hello, any answer to this question? On Friday, May 8, 2015 at 9:51:13 PM UTC+3, Michail Alexakis

[ansible-project] User performing local_action

2015-05-13 Thread John Oliver
joliver@flamingo ~ $ ansible-playbook -u joliver.sa -K deploy_checklist.yml SUDO password: PLAY [aria] *** GATHERING FACTS *** ok: [aria] TASK: [command mkdir {{

Re: [ansible-project] Re: User performing local_action

2015-05-13 Thread Brian Coca
-u is remote_user which does not map to local actions which are normally executed as the user which executed ansible, since local action does not 'log in' the only other was to change the user would be using privilege escalation (sudo/su/etc). On Wed, May 13, 2015 at 1:26 PM, John Oliver

Re: [ansible-project] Re: include_vars and hash-behaviour

2015-05-13 Thread Michail Alexakis
Hello Brian, I just tested the above with a freshly installed ansible==1.9.1, and the problem seems to be still here. I played the example posted above accompanied with a simple ansible.cfg: ``` [defaults] hash_behaviour = merge ``` Cant you reproduce it? On Wednesday, May 13, 2015 at

Re: [ansible-project] backup location in template module

2015-05-13 Thread Brian Coca
not yet, a couple of features we have been considering a)configurable 'backup depo' on target machine (/var/cache/ansible/backups) and/or backup up on 'master'. -- Brian Coca -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe

[ansible-project] running playbook for windows plus dynamic inventory and dynamic groups_vars

2015-05-13 Thread Ritesh Shetty
Hi I have a requirement to run playbook on hyperv compute nodes (windows) i tried the method mentioned to keep all variables . ansible_ssh_user: Administrator ansible_ssh_pass: password ansible_ssh_port: 5986 ansible_connection: winrm I use dynamic inventory to get the target hosts

Re: [ansible-project] running playbook for windows plus dynamic inventory and dynamic groups_vars

2015-05-13 Thread Andrea Tartaglia
Hi, you just have to add “vars” to the group name, so assuming “computenodes” is your group you would have something like: computenodes: { hosts: [ 192.168.0.68 ], “vars”:{ “var1”: “Var”, “var2”: 2 } } Have a look here:

Re: [ansible-project] fire-forget included playbook

2015-05-13 Thread Rahul Mehrotra
Hi Michael DeHaan , I am just getting started with Ansible and would appreciate if you can give an example of shell script to background playbacks for executing them in parallel. Regards Rahul Mehrotra On Friday, 26 July 2013 06:26:57 UTC-7, Michael DeHaan wrote: Yeah see the last half of