Re: [ansible-project] Register module output as host variables

2014-09-11 Thread Abubakr-Sadik Nii Nai Davis
I am on the development branch, and the ansible 1.8 (devel 1dc11c9752) release resolves the problem for me. Thank you very much. -- 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] limit now working as expected with multiple host sections

2014-09-11 Thread Matt Schurenko
Is this the correct behavior of using --limit: { $ cat test_inv [localhost] localhost [foobar] localhost $ cat test.yml --- - hosts: - localhost connection: local gather_facts: no tasks: - name: localhost debug: msg=localhost - hosts: - foobar connection: local gathe

[ansible-project] Cisco show command & ansible compatibility

2014-09-11 Thread maxime . gerges
Hello, I find out about this amazing project that is ansible and was wondering one important thing. I understood that ansible is driven to configuration automation. Is ansible also able to run some command on Cisco device, especially show command and process the output of those command ? This

[ansible-project] minimal sudoers configuration

2014-09-11 Thread Jeff Weber
I'm working on finalizing an implementation of an ansible poc for a new project, and as part of this poc our security team has asked for a minimal sudoers configuration for the ansible automation user. I'm currently using a "anything anywhere" type configuration, but looking at sudo logs I don't

Re: [ansible-project] minimal sudoers configuration

2014-09-11 Thread Michael DeHaan
Hi Jeff, There's a reference to this in the documentation on http://docs.ansible.com/intro_adhoc.html where it says "Rarely, some users have security"... In any case, it's usually not something valuable for the security team to enforce, because it also means you wouldn't be able to install any pa

Re: [ansible-project] Cisco show command & ansible compatibility

2014-09-11 Thread Michael DeHaan
Hi Maxime, Ciscos are problematic to manage because APIs are only starting to develop to some of their hardware with OnePK, so strong modules for Ansible don't really exist yet. You can definitely use the "raw" command to some extent I believe, which would be easy to try out, though it's only usi

Re: [ansible-project] ansible ovirt module

2014-09-11 Thread Piet83
Hello, In my playbook I had "resource_type=template" which should be "resource_type=new" as shown in your example. So now it works, I can provision a vm with Ansible!! Awesomeness!! Thank you for your help. Op dinsdag 19 augustus 2014 09:11:40 UTC+2 schreef Vincent Van der Kussen: > > Hi,

Re: [ansible-project] digital_ocean_domain - can it really create DNS records?

2014-09-11 Thread Jeff Johnson
Sorry for the delay, I didn't see your response until this morning. I have my script below which is taken almost verbatim from http://docs.ansible.com/digital_ocean_domain_module.html. The first call to digital_ocean_domain creates a zone file for "example-1.com" with NS records and a defaul

[ansible-project] Ansible Tower awx-celeryd & awx-task-system won't start

2014-09-11 Thread 'Jasper N. Brouwer' via Ansible Project
I'm trying to setup Ansible Tower (2.0.1) on Ubuntu Trusty (14.04.1) which runs in a Virtualbox (4.3.16) using Vagrant (1.6.5). Ansible 1.7.1 is installed. The supervisord tasks "awx-celeryd" and "awx-task-system" won't start: $ sudo supervisorctl status awx-callback-receiver            RUNNING

Re: [ansible-project] EC2 Rolling Deploy with an ASG

2014-09-11 Thread Will Thames
I have some relatively extensive documentation on ec2 - it might be a little too over the top for the user guide. http://willthames.github.io/2014/03/17/ansible-layered-configuration-for-aws.html If you want me to incorporate any or all of it into the user guide, I'd be happy to do so. I haven'

Re: [ansible-project] Ansible Tower awx-celeryd & awx-task-system won't start

2014-09-11 Thread Matt Martz
I do believe the appropriate direction is to point you to supp...@ansible.com. This list is for the open source project, tower support requests should be directed to the Ansible support team. On 9/11/14, 'Jasper N. Brouwer' via Ansible Project wrote: > I'm trying to setup Ansible Tower (2.0.1) o

Re: [ansible-project] digital_ocean_domain - can it really create DNS records?

2014-09-11 Thread Matt Martz
It appears as though others have recognized this limitation and have submitted pull requests for a module that would do what you are looking for: - library/cloud/digital_ocean_domain_record (2) - #8509 Add digital_ocean_domain_record to manage specific DNS records in digital_ocean.

Re: [ansible-project] Ansible Tower awx-celeryd & awx-task-system won't start

2014-09-11 Thread 'Jasper N. Brouwer' via Ansible Project
Fair enough, will do! -- Jasper N. Brouwer (@jaspernbrouwer) On 11 September 2014 at 14:45:51, Matt Martz (m...@sivel.net) wrote: > I do believe the appropriate direction is to point you to supp...@ansible.com. > > This list is for the open source project, tower support requests > should be di

[ansible-project] Helping test PRs

2014-09-11 Thread Michael DeHaan
Hi folks, for those that wish to help some things move along faster, we've compiled this handy guide about some easy ways to help with testing incoming changes: http://docs.ansible.com/developing_test_pr.html This is the first pass of this guide, so if you'd like to make contributions, you can do

Re: [ansible-project] Custom facts that require sudo

2014-09-11 Thread Michael DeHaan
Yeah that seems fine. You will want to turn off "gather_facts" and call it explicitly. What you are doing with site facts is a little weird, most folks would probably do a fact module and rather than calling it twice, split different things into different modules. On Wed, Sep 10, 2014 at 12:5

Re: [ansible-project] Stuck: One or more undefined variables: 'str object' has no attribute 'base'

2014-09-11 Thread Michael DeHaan
I'd need to see how you defined test previously to know for sure, but it seems like it was a list of strings and that would have been normal I think. On Wed, Sep 10, 2014 at 5:14 PM, Brian Coca wrote: > short description, list (or array) is as it sounds, simple list of > items, a dict or a ha

Re: [ansible-project] lookup inside default issue

2014-09-11 Thread Michael DeHaan
Hi, This is a big ball of stuff and jenkins_job isn't a core module, can you summarize a little bit about what you find to be strange behavior? I am having a hard time telling how the jenkins_job module call is related to the things below or what 'hydra' does. On Wed, Sep 10, 2014 at 6:13 PM

Re: [ansible-project] Roles install/uninstall process best practices

2014-09-11 Thread Michael DeHaan
Generally uninstalls aren't frequent. The reason for this is you don't know what software someone *manually* installed that you don't want present. One method might be to have a list of packages in something like group_vars/ called "uninstall_packages" and then just: - yum: name={{item}} state=

Re: [ansible-project] limit now working as expected with multiple host sections

2014-09-11 Thread Michael DeHaan
The short answer is: maybe, but it's probably more important that it's considered a feature. Often in configuring sets of machines, needing to run things locally is required to do some steps once and then apply them to a batch. Thus, almost never do you treat the control machine as "one of the r

Re: [ansible-project] digital_ocean_domain - can it really create DNS records?

2014-09-11 Thread Jeff Johnson
Thanks for the links to the pull requests. I'm looking forward to those being merged. I forgot to include my version: ansible --version ansible 1.7.1 -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubsc

Re: [ansible-project] EC2 Rolling Deploy with an ASG

2014-09-11 Thread Michael DeHaan
I definitely would like to see the ec2 guide upgraded to teach more ec2 concepts. It's largely a holdover from the very early days, and needs to show some basics like using add_host together with ec2 (as is shown elsewhere) but also some more idioms. I'd be quite welcome to see it mostly rewritte

[ansible-project] Developing a vars_plugin

2014-09-11 Thread Guy Matz
Hi! Anyone have any advice on developing a vars_plugin? This may sound kinda screwy, but for a chef -> ansible transition I need to access data from a chef data_bag in an ansible play . . . I'm able to get the chef data using pychef, but I'm having issues when trying to run the code within vars_

Re: [ansible-project] Cisco show command & ansible compatibility

2014-09-11 Thread maxime . gerges
Thansks for the anwser. I will thus create my own module with a list of possible task (parsing show mac-address table,...) to return some json objects. However I'd like to kown if the output of module's can be print into a file, I saw a lot of message stating to set debug but only with stdout. I

[ansible-project] debconf, can't get it to conf

2014-09-11 Thread Alainkr
Hello, I'm doing on a on a debian wheezy the vanila : - debconf: name=locales question='locales/locales_to_be_generated' value='en_US.UTF-8 UTF-8, fr_FR.UTF-8 UTF-8' vtype='multiselect' - debconf: name=locales question='locales/default_environment_locale' value=fr_FR.UTF-8 vtype='selec

Re: [ansible-project] Developing a vars_plugin

2014-09-11 Thread Matt Martz
Perhaps you could show your vars_plugin? There is the potential that it could be run twice, depending on where you call that code from. The 3 following methods are all run 1 time in ansible.inventory.Inventory: plugin.get_group_vars plugin.run plugin.get_host_vars Also, as a heads up, this is p

Re: [ansible-project] Developing a vars_plugin

2014-09-11 Thread Guy Matz
migrated to ansible-devel . . . thanks! On Thu, Sep 11, 2014 at 11:40 AM, Matt Martz wrote: > Perhaps you could show your vars_plugin? There is the potential that it > could be run twice, depending on where you call that code from. > > The 3 following methods are all run 1 time in ansible.inve

Re: [ansible-project] EC2 Rolling Deploy with an ASG

2014-09-11 Thread Scott Anderson
Wow, I wish I'd seen this conversation earlier. I have a module that does this, using something similar to option 1. My module respects multi-AZ load balancers and results in a completely transparent deploy, *so long as* the code in the new AMI can run alongside the old code. There's a start of

Re: [ansible-project] debconf, can't get it to conf

2014-09-11 Thread Karl E. Jorgensen
Hi On Thu, Sep 11, 2014 at 08:40:33AM -0700, Alainkr wrote: > Hello, > > I'm doing on a on a debian wheezy the vanila : > > - debconf: name=locales question='locales/locales_to_be_generated' value= > 'en_US.UTF-8 UTF-8, fr_FR.UTF-8 UTF-8' vtype='multiselect' > - debconf: name=locales qu

[ansible-project] Script module question

2014-09-11 Thread Tiglath
I need to run a script from a particular remote directory. Can script be told to copy to a particular dir before running the script, or it's a matter of using a copy + shell? Thanks -- You received this message because you are subscribed to the Google Groups "Ansible Project" grou

Re: [ansible-project] EC2 Rolling Deploy with an ASG

2014-09-11 Thread Scott Anderson
For comparison: https://github.com/scottanderson42/ansible/blob/ec2_vol/library/cloud/ec2_asg_cycle Still a work in progress (as you should be able to tell from the logging statements :-), but we've been using it in production for several months and it's (now) battle tested. The "Slow" method i

Re: [ansible-project] EC2 Rolling Deploy with an ASG

2014-09-11 Thread James Martin
Scott, Neat to see someone else's approach. The "fast method" you have there probably could be worked into what's been merged. Another approach (maybe simpler) would just be stand up a parallel ASG with the new AMI. I like making the AutoScale Group do the instance provisioning, versus your app

Re: [ansible-project] EC2 Rolling Deploy with an ASG

2014-09-11 Thread Scott Anderson
On Sep 11, 2014, at 2:26 PM, James Martin wrote: > Scott, > > Neat to see someone else's approach. The "fast method" you have there > probably could be worked into what's been merged. Another approach (maybe > simpler) would just be stand up a parallel ASG with the new AMI. The general

Re: [ansible-project] EC2 Rolling Deploy with an ASG

2014-09-11 Thread James Martin
On Thu, Sep 11, 2014 at 2:51 PM, Scott Anderson wrote: > > The general problem with this approach is that it doesn’t work well for > blue-green deployments, nor if the new code can’t coexist with the > currently running code. > Yep, understood. > I think we’re probably going to move to a syste

[ansible-project] Setting host vars programmatically with dynamic inventory

2014-09-11 Thread Ches Martin
Hi folks, I've been trying to come up with a solution to what essentially boils down to this: Say I'm writing, or simply using, a role which depends on a host var being set for all targeted hosts. An example is ZooKeeper, where each member of an ensemble needs a unique ID configured, and needs

[ansible-project] Getting the ID of an AMI created with Ansible

2014-09-11 Thread Peter Palmieri
I'm building an EC2 instance with Ansible, then creating an AMI from the instance. I'm sure I'm missing something here, but how do I get the ID of the newly created AMI? I've tried: tasks: - name: create an ami in us-east-1 ec2_ami: wait=yes aws_access_key={{ ec2_access_key }}

Re: [ansible-project] EC2 Rolling Deploy with an ASG

2014-09-11 Thread Scott Anderson
On Sep 11, 2014, at 3:26 PM, James Martin wrote: > I think we're probably going to move to a system that uses a tier of proxies > and two ELBs. That way we can update the idle ELB, change out the AMIs, and > bring the updated ELB up behind an alternate domain for the blue-green > testing. Then

Re: [ansible-project] Roles install/uninstall process best practices

2014-09-11 Thread Trevor G
Ok, thanks for the suggestion. I've gone through a few different iterations of ideas and I think I'm just going to punt on the problem and assume we're going to be using phoenix servers most of the time. It would have helped to be able to include a role and be able to pass the tagged tasks to

[ansible-project] Ansible in standalone configuration

2014-09-11 Thread Andrew Langhorn
Hello. This evening, I went to the inaugural London Ansible meet-up, which I found useful. As a result, I've decided to try out Ansible and see how I get to grips with it. I'm a Puppet user at the moment, but it would be good to learn another config management tool, too. AIUI, and at a high

Re: [ansible-project] Ansible in standalone configuration

2014-09-11 Thread Michael DeHaan
Hi Andrew, Ansible can totally run in local mode. In the play, either do "connection: local" or just do "-c local" at the command line level. There's also ansible-pull if you really want something pull based, but push is better :) I don't think you would explicitly need to do that because most

RE: [ansible-project] Ansible in standalone configuration

2014-09-11 Thread Andrew Langhorn
Hey Michael, Wow - that was a speedy reply! Thanks! Great, as I'll envisage running Ansible locally to begin with, it makes sense to just include it in my plays. I hadn't really given much consideration to push and pull with Ansible yet, but I prefer push-based stuff in general, so that wou

Re: [ansible-project] Script module question

2014-09-11 Thread Michael DeHaan
The "script" module will push to the remote and also run it, all in one go. http://docs.ansible.com/script_module.html On Thu, Sep 11, 2014 at 1:55 PM, Tiglath wrote: > > I need to run a script from a particular remote directory. > > Can script be told to copy to a particular dir before runni

Re: [ansible-project] Setting host vars programmatically with dynamic inventory

2014-09-11 Thread Michael DeHaan
On Thu, Sep 11, 2014 at 3:03 PM, Ches Martin wrote: > Hi folks, > > I've been trying to come up with a solution to what essentially boils down > to this: > > Say I'm writing, or simply using, a role which depends on a host var being > set for all targeted hosts. An example is ZooKeeper, where eac

Re: [ansible-project] Stuck: One or more undefined variables: 'str object' has no attribute 'base'

2014-09-11 Thread Patrick Ansible-ML
Hi Brian, On 10-09-14 23:14, Brian Coca wrote: short description, list (or array) is as it sounds, simple list of items, a dict or a hash is a list that uses an 'name' to locate the item Got it. 1, 2, 3 < = simiple list, in python/yaml/json (stuff ansible uses) it is normally in brackets my

Re: [ansible-project] Roles install/uninstall process best practices

2014-09-11 Thread Michael DeHaan
Roles do not have a "run_tags" or a "skip_tags" -- the "tags" on a role will apply the tag to anything in the role, as it should. --tags and --skip-tags are arguments to ansible-playbook. I wouldn't teach a role to uninstall itself in most cases. In most cases, you want to be able to rebuild tha

Re: [ansible-project] Stuck: One or more undefined variables: 'str object' has no attribute 'base'

2014-09-11 Thread Michael DeHaan
Yeah I am overdue to update the language_features dir, it should be all mostly accurate, but it should be a little better organized - we've been focusing on docs.ansible.com for a long time. I don't think it will teach any bad habits though :) On Thu, Sep 11, 2014 at 8:04 PM, Patrick Ansible-ML

[ansible-project] Ansible doesn't seem to be merging my dictionary...

2014-09-11 Thread David Reagan
In ansible.cfg I have set hash_behaviour=merge In group_vars/all.yml aspects_monit_local_probes: > localresources: | > check system {{ ansible_hostname }} > if loadavg (1min) > 4 then alert > if loadavg (5min) > 2 then alert > if memory usage > 75% then alert > if sw

Re: [ansible-project] Getting the ID of an AMI created with Ansible

2014-09-11 Thread James Cammarata
You should be able to just do: - debug: var=instance.image_id Which should print out the image's ID. If not, could you share what it does show? On Thu, Sep 11, 2014 at 2:00 PM, Peter Palmieri wrote: > I'm building an EC2 instance with Ansible, then creating an AMI from the > instance. I'm sure

[ansible-project] Document the JSON output for each module

2014-09-11 Thread John Yeuk Hon Wong
Problem: I found stat module and I was wondering what I could use from the JSON output for my conditional statement. I either have to use debug: msg="{{stat_output}}" or refer to the code: https://github.com/ansible/ansible/blob/devel/library/files/stat#L100 The stat module is pretty neat and

Re: [ansible-project] Elasticsearch restart task hangs up in Ansible Playbook

2014-09-11 Thread Roopendra Vishwakarma
Fix this problem. Cause of the issue. I am using old version of service wrapper script for elasticsearch. After update * /etc/init.d/elasticsearch* everything is working fine. On Wednesday, 10 September 2014 18:55:59 UTC+5:30, Roopendra Vishwakarma wrote: > > I tried playbook on* ansible 1.8