Re: [ansible-project] Run Ansible Playbook inside Docker container?

2015-06-29 Thread Erik Anderson
Sure, the general pattern I follow is thus: 1. I use a base docker image that already has ansible installed. 2. In your Dockerfile, use the COPY command to copy your ansible files (playbook yaml, files, etc.) into the container. Something like: COPY ansible/ /tmp/ansible/ 3. After the copy, in y

Re: [ansible-project] ansible does not recognize parameter "stat"

2015-06-29 Thread Guohua Ouyang
figure it out, there is /usr/lib/python2.7/site-packages/ansible-2.0.0-py2.7.egg, which may cause some unexpected behaviour. after delete that directory and reinstall ansible, the problem is gone. On Mon, Jun 29, 2015 at 9:24 PM, Guohua Ouyang wrote: > Hello, > > I meet an odd issue is that an

[ansible-project] Run Ansible Playbook inside Docker container?

2015-06-29 Thread Alejandro Ferrari
Hi All, I like to know if someone is using Ansible to provisioning inside a Docker container... and how use this? I has all my infrastructure in Playbooks, now l like to use this to create Dockers for each of my microservices... but I can't found some alternatives... As we know Ansible use

Re: [ansible-project] Re: ERROR! Invalid shell type specified (bash), or the plugin for that shell type is missing.

2015-06-29 Thread Brian Coca
ok, so it seems we just need to make sure when we have bash as the executable to set the shell type to sh -- 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 a

Re: [ansible-project] Re: uri_module - json post

2015-06-29 Thread Brian Coca
that will work for most modules, but some do depend on features only in the version they were merged, so this will work most of the time but not 100%. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this g

Re: [ansible-project] environment variables for a role

2015-06-29 Thread Brian Coca
sorry, you are correct, environment will added to roles in 2.0 (should work in current devel) -- 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

[ansible-project] Re: lookup_plugins config does not seem to work

2015-06-29 Thread Barry Kaplan
Sigh, user error. For reasons I will never know I named my plugin with the .yml extension instead of .py. But, on the upside, I got to find out just how incredibly well the the Intellij debugger works with python. For those interested: 1) Create a run configuration. In my case it was like: s

Re: [ansible-project] Re: Playbook directory organisation

2015-06-29 Thread Tom Paine
Have updated that thread with an inventory script that can pick up any YAML vars files you'd like. On Sun, Jun 28, 2015 at 11:53 AM, James Morgan wrote: > Interesting read though that seems to concern itself with the group_var / > inventory layouts. I don't really have a problem there. Just the

Re: [ansible-project] [feature request] module assemble

2015-06-29 Thread Brian Coca
All lookups can be invoked in 2 forms lookup('' ,. or with_, they are the same thing. so you can use with_pipe: -- 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 fr

Re: [ansible-project] Ansible playbook to install Ansible Roles for new Ansible Installs

2015-06-29 Thread Phill Pafford
Thanks, I found one: https://galaxy.ansible.com/list#/roles/1105 On Monday, June 29, 2015 at 4:45:37 PM UTC-4, Brian Coca wrote: > > You can have a task that calls ansible-galaxy to install roles (and > put that task in a role). > > -- > Brian Coca > -- You received this message because you

Re: [ansible-project] Ansible playbook to install Ansible Roles for new Ansible Installs

2015-06-29 Thread Brian Coca
You can have a task that calls ansible-galaxy to install roles (and put that task in a role). -- 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

[ansible-project] Ansible playbook to install Ansible Roles for new Ansible Installs

2015-06-29 Thread Phill Pafford
I'd like to automate Developers Laptops with the correct roles using Ansible to install the Roles. Example: I have 25 Roles, some internal and some external, is there a Role to install Roles? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group

Re: [ansible-project] [Feature Request] Galaxy Role Statistics

2015-06-29 Thread Tom Paine
The Atom editor packages site does a reasonable job (https://atom.io/packages/search?q=ansible). Usage counts is a fair way to measure how good a package is without relying on community scoring - similar to Ubuntu's Popularity Contest (http://popcon.ubuntu.com) On Friday, June 26, 2015 at 9:25

Re: [ansible-project] Ansible Jinja indentation bug ?

2015-06-29 Thread Matt Martz
The problem from what I can remember is that ansible does not specify lstrip_blocks, and as such, it can cause indentation issues. The approach I take, it to left justify all jinja2 control blocks. So all {% %} lines would have no indentation, only the lines inside would be indented. such as: {

[ansible-project] Ansible Jinja indentation bug ?

2015-06-29 Thread Nicolas G
Hi, I have the bellow vars to populate a template , it works almost fine but the final file result you can see there is some indentation problem : # vars : datadog_http_checks: - name : mycheck url : http://localhost:9090/hc/ threshold : 5 window : 5 timeout : 1 # template:

Re: [ansible-project] Inventory and group_vars layout advice

2015-06-29 Thread Hagai Kariti
Thanks for sharing! Glad I could help. :) On Mon, Jun 29, 2015, 20:16 ddffgpmfn wrote: > Thanks to Hagai I have a good solution worth sharing. > > * add common_vars.sh bash script to each of the inventories I wish to > share variables. Make it executable. Point it where your common Ansible > YAM

Re: [ansible-project] Inventory and group_vars layout advice

2015-06-29 Thread ddffgpmfn
Thanks to Hagai I have a good solution worth sharing. * add common_vars.sh bash script to each of the inventories I wish to share variables. Make it executable. Point it where your common Ansible YAML variables are (in my case inventory/common_vars.yml). * add common_vars.yml and populate it Ru

[ansible-project] Re: ec2 module, encrypted: true doesn't create EBS volume with encryption enabled

2015-06-29 Thread Dean Mills
Disk encryption is not supported on a t2.micro instance. You need to use a supported instance size and then it should work. Did the instance creation fail? My guess is it should, but perhaps that depends on what AWS/boto sends back. http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncrypti

[ansible-project] lookup_plugins config does not seem to work

2015-06-29 Thread Barry Kaplan
I have been using filter plugins with the ansible.cfg setting: filter_plugins = plugins/filter_plugins This is and has been working great. But now when I add: lookup_plugins = plugins/lookup_plugins No lookup plugins are not found. The best I can tell the lookup is by filename (unlike the filt

Re: [ansible-project] Possible bug in 1.9.2 ec2

2015-06-29 Thread Barry Kaplan
https://github.com/ansible/ansible/issues/11422 -- 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

Re: [ansible-project] Possible bug in 1.9.2 ec2

2015-06-29 Thread Barry Kaplan
Looks like it a bug with count=1 - name: count=2 debug: var=item with_sequence: count=2 - name: count=1 debug: var=item with_sequence: count=1 TASK: [count=2] *** ok: [localhost] => (item=1) => { "

Re: [ansible-project] Possible bug in 1.9.2 ec2

2015-06-29 Thread Barry Kaplan
And it doesn't matter if the instance already exists. Even when trying to create new instance the task is skipped. (Which makes sense -- a skip is a skip.) -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and s

Re: [ansible-project] Possible bug in 1.9.2 ec2

2015-06-29 Thread Barry Kaplan
This remains in 1.9.2 -barry -- 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 email

[ansible-project] ansible does not recognize parameter "stat"

2015-06-29 Thread Guohua Ouyang
Hello, I meet an odd issue is that ansible does not recognize parameter "stat" on one of my hosts, but it work on another host. Checked that /usr/lib/python2.7/site-packages/ansible/modules/core/files/stat.py is existed. [guohua@ghua kubernetes-ansible]$ rpm -q ansible ansible-1.9.1-2.fc22.no

[ansible-project] Re: Postgres - grant role to user

2015-06-29 Thread Ian Levesque
On Sunday, June 28, 2015 at 10:36:53 AM UTC-4, Ian Levesque wrote: I'm trying to figure out if/how I can use the postgresql_user module to > grant a role to a user. > > I thought I may be able to specify the role via role_attr_flags but that > doesn't work for granting a custom role. > To answ

Re: [ansible-project] How to use roles from the command line?

2015-06-29 Thread Marc Abramowitz
On Monday, June 29, 2015 at 5:51:15 AM UTC-7, Brian Coca wrote: > > fact gathering is one issue I see, off the bat. The template module is > hardcoded to error on adhoc, because of this. > I'm not following. Can you elaborate on this? -- You received this message because you are subscribed to

[ansible-project] Applications version dependencies over multiple hosts

2015-06-29 Thread Christian Strässle
Hi all, I would like to have something like application dependencies over multiple hosts. For example: - Application-Y version 5 on frontend needs at least Application-Z version 3 on backend installed. Is this doable with Ansible and how? Kind regards, Chris -- You received this message bec

[ansible-project] Variables About Other Hosts

2015-06-29 Thread Raul SEVILLA CAÑAVATE
I'm getting problems while trying to access variables from another host in my Ansible template. I'm using a SSH proxycommand configuration to access 'internal' instances in EC2. My inventory host file is like: cat /etc/hosts [test1] test1 [test2] test2 My SSH configuration: Host test1 Use

[ansible-project] Re: AWS s3 module and IAM-role-based access control

2015-06-29 Thread Ankit Jindal
I have successfully setup ec2 instance on aws with database but I am unable to connect aws s3 instance with ec2 instance. Can you please help me out in this?? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group a

Re: [ansible-project] [feature request] module assemble

2015-06-29 Thread wojtas
Hi, THX for quick answer Sorry I'm sill beginner in ansible, But is it possible to combine that with some loop? In https://docs.ansible.com/playbooks_loops.html i can't see example like that shout i use a nested (with_nested:) because it will look like /SVN_PATH/keys/root /SVN_PATH/keys/deploy /SV

Re: [ansible-project] How to use roles from the command line?

2015-06-29 Thread Brian Coca
fact gathering is one issue I see, off the bat. The template module is hardcoded to error on adhoc, because of this. -- 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 f

Re: [ansible-project] [feature request] module assemble

2015-06-29 Thread Brian Coca
lookup('pipe','ls -1 /SVN_PATH/keys/ |grep -v root') ? On Mon, Jun 29, 2015 at 7:43 AM, wojtas wrote: > Hi Brian > Yes i did smt like that, but i have a problem with file lookup's. > What I want to make is > - checkout repo (simple) > - root is static (assmble from /SVN_PATH/keys/root/* to > /roo

Re: [ansible-project] [feature request] module assemble

2015-06-29 Thread wojtas
Hi Brian Yes i did smt like that, but i have a problem with file lookup's. What I want to make is - checkout repo (simple) - root is static (assmble from /SVN_PATH/keys/root/* to /root/.ssh/auth_keys) - for $(ls -1 /SVN_PATH/keys/ |grep -v root) ;do assemble /home/username_from_for_loop/.ssh/aut