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

2015-12-07 Thread Jeff Reter
https://github.com/ansible/ansible/issues/13375#issuecomment-161379814 "well, in 2.0 missing tags will not error out (yet), but this does seem like an interesting corner case, it should affect empty plays and includes also." Am Montag, 7. Dezember 2015 19:31:31 UTC+1 schrieb James Cammarata:

Re: [ansible-project] Run Handlers like a task

2015-12-07 Thread Steve Malenfant
Thanks, that can be useful. On Saturday, December 5, 2015 at 1:39:22 AM UTC-5, Brian Coca wrote: > > no, but you can try something like this: > ``` > - debug: msg="execute {{handler}}" > changed_when: True > when: handler is defined > notify: "{{handler}}" > tags: ['handler'] >

Re: [ansible-project] How to use ec2 modules user_data field?

2015-12-07 Thread Bryan Larsen
On Friday, 26 December 2014 05:05:33 UTC-5, Catalin Costache wrote: > > Yaml has a notation for multiline string. I set user data like so: > > user_data: | > #!/bin/bash > echo "Defaults:{{admin_user}} !requiretty" > /etc/sudoers.d/ > disable_requiretty > I'm having trouble using

[ansible-project] configure VM IP along with vsphere_guest

2015-12-07 Thread Sri Krishna G
hi all, i am trying to see how to assign IP to a VM after it is created with the vsphere_guest module. i have gone through the pysphere SDK documentation, and i gather that it supports assigning an IP. has any one tried to get it to work? if this topic was already discussed please point me to

[ansible-project] Deploying AWS infra with CloudFormation and provisioning application in same playbook

2015-12-07 Thread Juris
Hi, I am having hard time figuring out idiomatic way of doing AWS infrastructure deployment and application e.g. EC2 instance provisioning in one go in same playbook. The problem being accessing EC2 host in the next play after AWS infrastructure creation. The example playbook is as follows:

[ansible-project] Using with_dict but skipping certain items

2015-12-07 Thread David Stewart
Hi, I am new to Ansible and am having difficulty in understanding how a loop created with a 'with_dict' directive can be filtered based upon values within the dictionary. For instance, I want a dictionary of users that need to be put into a specific state, e.g.: users: testuser1: {state:

Re: [ansible-project] empty ansible_domain from setup

2015-12-07 Thread markham breitbach
Thanks Brian, that's a great place to start. I will see where that take me. -Markham > -- 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] Re: Ansible createsuperuser with django_manage module.

2015-12-07 Thread anoop . kolari
Hi Chris, I have created a custom django management command to set admin password called 'change_django_admin_password' and calling this through ansible as below; - name: "Run django manage commands for the apps." django_manage: command="{{item.cmd}}"

[ansible-project] Re: Deploying AWS infra with CloudFormation and provisioning application in same playbook

2015-12-07 Thread James Martin
I would tag the instances in your CF template, then reference those tagged hosts by the inventory groups that are created with the ec2.py dynamic inventory script. If you do this in two separate ansible-playbook runs, you won't need to do anything special, the inventory will reflect the newly

[ansible-project] Config Mgt Tech Stack Support with Ansible

2015-12-07 Thread Ashwin Radhakrishnan
Hi Guys, I am newbie to Ansible and I have some specific queries: 1. Application/Web Serves Run-time Snapshot & Drift : Do we have out of the box Ansible playbooks which can create Application Server level Snapshot, For example a WAS ND Snapshot will be having details like JVM, JDBC, JMS,

[ansible-project] Wrapping roles inside blocks to catch failures

2015-12-07 Thread David Moreau Simard
I love the idea around the new block feature in Ansible 2. The example in the documentation includes tasks, I wanted to know if there was other areas/scopes in which we could include them ? It doesn't look like I can get my two use cases

[ansible-project] Re: Ansible Best Practice.

2015-12-07 Thread Mike Biancaniello
Originally, I was containing my vars within the roles, but after realizing that those vars override everything else, instead, I only populate the default/main.yml with vars inside the roles, just so things don't error, and define everything else in my main group_vars. So, in my setup, when I

[ansible-project] yum module fails to install multiple packages

2015-12-07 Thread Александр Костырев
Name: ansible Version : 1.9.2 I've got a simple play --- - hosts: all tasks: - name: debug debug: msg: "{{ item }}" with_items: - foreman_discovery - foreman_default_hostgroup tags: foreman-plugins-debug - name: debug install

[ansible-project] Re: Deploying AWS infra with CloudFormation and provisioning application in same playbook

2015-12-07 Thread Juris
James, I stumbled across ec2.py dynamic inventory and immediately got bit the issue no refresh of dynamic inventory if executed from the same playbook. If I go with the approach of separating cloud infrastructure deployment and application provisioning into a separate playbooks then this

[ansible-project] Re: Combinations of lists

2015-12-07 Thread Mike Biancaniello
have you tried ansible_nested ( http://docs.ansible.com/ansible/playbooks_loops.html#nested-loops) Enter code here..--- - name: stuff hosts: localhost gather_facts: no connection: local vars: l: [a,b,c] n: [1,2,3] tasks: - name: show nested debug: msg="[{{ item[0]

Re: [ansible-project] Re: Deploying AWS infra with CloudFormation and provisioning application in same playbook

2015-12-07 Thread Stephen Granger
Maybe you just need to add the host (cf.stack_outputs.PublicIP) to a group as per the example here using the add_host module, this will add it to your inventory temporarily http://docs.ansible.com/ansible/ec2_module.html - name: create some ec2 instances ec2: register: ec2

[ansible-project] Re: Combinations of lists

2015-12-07 Thread Chris Searle
I cannot believe I missed that. Well - actually I can - I said I thought I was missing something obvious :) I don't know how many times I read the with_nested docs without spotting it was _exactly_ what I needed - even by name. For some reason it just didn't register. Many thanks - worked

Re: [ansible-project] ansible.cfg file...where to find a new copy after in-place upgrade to 2.0?

2015-12-07 Thread Brian Coca
In the repo its always been in examples/ansible.cfg -- 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] Re: yum module fails to install multiple packages

2015-12-07 Thread Dick Davies
Right, i'd suggest you have 2 dicts or lists - one for Debians and one for EL linuxes - and conditionally load them into the yum: task based on ansible_os_family. On 7 December 2015 at 16:44, Александр Костырев wrote: > Okay > I found this >

[ansible-project] vars_files-When are the variables loaded?

2015-12-07 Thread smalleni
In one my plays, a task executes a script that parses a file and exracts some credentials and saves them to a yaml file. If I try to access the variables in the file using vars_files it doesn't work as I guess ansible tries to figure out the values of the variables even before any of the tasks

Re: [ansible-project] Re: yum module fails to install multiple packages

2015-12-07 Thread Александр Костырев
You don't get it. Plugins are optional. They may or may not be wanted by user. So I pushed to my repo the code that breaks just to illustrate want I'd like to achieve with ansible https://github.com/kostyrevaa/ansible-role-foreman We've got vars for Ubuntu

Re: [ansible-project] Re: yum module fails to install multiple packages

2015-12-07 Thread Александр Костырев
I don't know which plugins someone would like to install so I can't have hard-coded list. On Tuesday, 8 December 2015 00:04:19 UTC+3, Dick Davies wrote: > > Right, i'd suggest you have 2 dicts or lists - one for Debians and one for > EL linuxes - and conditionally load them into the yum: task

Re: [ansible-project] vars_files-When are the variables loaded?

2015-12-07 Thread Brian Coca
vars_files executes in the 'playbook compile phase' if you want to dynamically load vars use include_vars module. -- 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

[ansible-project] Re: ansible galaxy question

2015-12-07 Thread Александр Костырев
yeah... what's called roles and profiles in puppet world On Sunday, 6 December 2015 05:55:35 UTC+3, Joanna Delaporte wrote: > > Hi Serge, > > Sorry, tab works differently in chrome than vim. Maybe I can find a plugin > to fix my browser. :). > > I was going to write this small example of a list

Re: [ansible-project] Re: yum module fails to install multiple packages

2015-12-07 Thread Александр Костырев
and I'd like to add that end-user should not be bothered with differences in packages' names in OSes Setting foreman_plugins: - discovery - bootdisk is all what have to be done. On 8 Dec 2015 01:04, "Dick Davies" wrote: > Right, i'd suggest you have 2 dicts or lists

[ansible-project] How to make Ansible output look nice?

2015-12-07 Thread Joanna Delaporte
I have been looking around and cannot find the answer to this...my ansible output looks terrible, and is difficult to read. What is the best way to make it more readable? (item={'value': {u'services': [u'dns'], u'sources': [u'0.0.0.0/0'], u'state': u'enabled', u'permanent': u'True'}, 'key':

Re: [ansible-project] How to make Ansible output look nice?

2015-12-07 Thread Brian Coca
You can use the callback plugins, specially in 2.0 you can control all aspects of output. For more options, visit https://groups.google.com/d/optout. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this

[ansible-project] Ansible 2.0 RC2 is available for testing!

2015-12-07 Thread James Cammarata
Hi all, we're happy to announce the second release candidate for Ansible 2.0! This release candidate includes a few bug fixes and cleanups since rc1 was released, and if we don't have anything major show up in the next few days we'll be releasing 2.0-final, so get testing! For details and