[ansible-project] Re: Create different sets of users on different sets of hosts

2014-10-29 Thread mephage
Made an error (why aren't google group posts editable? who knows...). Should read: 4. Create group_vars files for each group: 'group_vars/myhosts': --- groups_users_sysadmins: no groups_users_db: no 'group_vars/*sysadmins*': --- groups_users_sysadmins: yes 'group_vars/db': --- groups_users_db:

[ansible-project] Using Ansible with Cloudformation

2014-10-29 Thread S.Mclaughlin
I am trying to use ansible to provision a CoreOS cluster and I am newbie to Ansible. I followed the directions for the ansible cloudformation module but I am lost as to what should be the contents of my hosts file? Will appreciate any assistance. Thanks. -- You received this message because yo

[ansible-project] Ansible ignoring Ubuntu yml file

2014-10-29 Thread Vikas Kumar
Hello Everyone, I am new to Ansible world. I am just trying to create a small playbook to install apache2 on Debian 7.4 and Ubuntu14.04 servers. I have defined few variables in two different yml files - Ubuntu.yml and Debian.yml My problem is that ansible is ignoring everything is Ubuntu.yml a

[ansible-project] Cant call hostvars variables from a task in a role

2014-10-29 Thread Leandro Reox
Folks, Were dealing with some weird issue that we want to clarify, clearly were understanding something wrong Heres is our current playbook distribution, with roles and stuff deploy/ ├── ansible.cfg ├── filter_plugins │ ├── search_hostvars.py │ └── search_hostvars.pyc ├── group_vars │ ├─

[ansible-project] Using ansible cloudformation module with coreos

2014-10-29 Thread S.Mclaughlin
Hey, I am using Ansible Cloudformation module to provision the a CoreOS cluster. I configured the playbook based on the instructions on the Cloudformation module's page but I am lost as to what should be in the host file. Can someone please advise? Thanks. -- You received this message because

[ansible-project] Re: RHEL6.6 and ControlPersist

2014-10-29 Thread mtovey
I deployed a new OEL6.5 server, then upgraded OpenSSH to the new ControlPersist release and installed Ansible onto it. Without making any configuration changes to anything other than adding server names to the hosts file, I tried to use Ansible to copy a file to another server, and it fa

Re: [ansible-project] Re: PyCharm & Modules

2014-10-29 Thread Tennis Smith
Good idea. Thanks. -T On Wed, Oct 29, 2014 at 4:13 PM, Brian Coca wrote: > also look at hacking/test-module, it allows a debugger to attach to test a > module directly > > On Wed, Oct 29, 2014 at 5:07 PM, Tennis Smith wrote: > >> Thanks, Jon. I'll poke around. >> -T >> >> >> On Wednesday, Octo

Re: [ansible-project] ansible_ssh_user and ansible_ssh_pass in windows.yml

2014-10-29 Thread Matt Martz
--ask-pass is the equivalent of specifying a single password for all remote nodes with ansible_ssh_pass. On Wednesday, October 29, 2014, skinnedknuckles < andersonjonatha...@gmail.com> wrote: > So then when I run ansible with the --ask-pass switch and it asks me for > SSH password, ansible_ssh_pa

[ansible-project] Re: ansible_ssh_user and ansible_ssh_pass in windows.yml

2014-10-29 Thread skinnedknuckles
So then when I run ansible with the --ask-pass switch and it asks me for SSH password, ansible_ssh_pass is the password they want or is that a different password. On Wednesday, October 29, 2014 4:58:04 PM UTC-5, skinnedknuckles wrote: > > Details: > Ansible 1.8 > CentOs 7 > Windows 7 (not a serv

Re: [ansible-project] ansible_ssh_user and ansible_ssh_pass in windows.yml

2014-10-29 Thread Matt Martz
It is the username/password combination for the remote nodes (in your case the windows nodes). You can also configure them in host_vars, or potentially in a dynamic inventory script that pulls that info from a CMDB or database. On Wednesday, October 29, 2014, skinnedknuckles < andersonjonatha...@

Re: [ansible-project] ansible_ssh_user and ansible_ssh_pass in windows.yml

2014-10-29 Thread Michael Peters
It will be the remote nodes. In lots of cases these are all the same (lots of setups have the same management account with the same credentials on the managed nodes). And if you need to specify per-host variables for the remote nodes you can do that as well in your inventory. On Wed, Oct 29, 2014

[ansible-project] ansible_ssh_user and ansible_ssh_pass in windows.yml

2014-10-29 Thread skinnedknuckles
Details: Ansible 1.8 CentOs 7 Windows 7 (not a server os) Documentation specifies that for remote nodes running windows we add these definitions to /etc/ansible/group_vars/windows.yml ansible_ssh_user: Administrator ansible_ssh_pass: SekritP

Re: [ansible-project] Re: PyCharm & Modules

2014-10-29 Thread Brian Coca
also look at hacking/test-module, it allows a debugger to attach to test a module directly On Wed, Oct 29, 2014 at 5:07 PM, Tennis Smith wrote: > Thanks, Jon. I'll poke around. > -T > > > On Wednesday, October 29, 2014 3:49:45 PM UTC-5, Jon Forrest wrote: >> >> >> >> On Wednesday, October 29, 2

[ansible-project] Re: PyCharm & Modules

2014-10-29 Thread Tennis Smith
Thanks, Jon. I'll poke around. -T On Wednesday, October 29, 2014 3:49:45 PM UTC-5, Jon Forrest wrote: > > > > On Wednesday, October 29, 2014 9:52:11 AM UTC-7, Tennis Smith wrote: >> >> Hi, >> >> Has anyone found a good way to debug ansible modules via the PyCharm >> debugger? >> >> -T >> > > I

[ansible-project] ec2_eip is not idempotent

2014-10-29 Thread erewh0n
Depending on your use case, ec2_eip is not idempotent. I would like to attach a new EIP to an instance *iff* the instance doesn't already have an EIP attached. Currently, the module operates in two modes: 1. if you don't specify an existing EIP address, the module will attach a new arbi

Re: [ansible-project] RHEL6.6 and ControlPersist

2014-10-29 Thread mtovey
When I saw this discussion thread, I was thrilled because I am using OEL6.5 with OpenSSH-5.3. Since that is equivalent to RHEL6.5, that meant that there should be an update to OpenSSH for OEL too. Sure enough, there is (openssh-5.3p1-104.el6.x86_64). But when I installed it, I could no

[ansible-project] Re: PyCharm & Modules

2014-10-29 Thread Jon Forrest
On Wednesday, October 29, 2014 9:52:11 AM UTC-7, Tennis Smith wrote: > > Hi, > > Has anyone found a good way to debug ansible modules via the PyCharm > debugger? > > -T > I did a little looking into this. The first problem is making Ansible not delete the modules on the remote host. The docum

[ansible-project] Re: Ansible can't find module

2014-10-29 Thread Sankalp Khare
The documentation says: Modules can be written in any language and are found in the path specified by ANSIBLE_LIBRARY or the --module-path command line option. [ http://docs.ansible.com/developing_modules.html ] On Tuesday, 28 October 2014 14:01:26 UTC-5, Tiglath wrote: > > > Error is > >

[ansible-project] Re: include_vars not working correctly in case of remote hosts

2014-10-29 Thread Sankalp Khare
The end-goal is to get the variables loaded into your ansible run. How about separating out your task into two distinct activities: 1. Fetching the file from S3 *on the machine where you are doing the ansible run*, and loading variables from it 2. Uploading a copy of the file to the rem

Re: [ansible-project] Configuring Ansible to run play books through a bastion host on aws/ec2

2014-10-29 Thread Matt Davis
I suppose I could do both. I personally prefer the explicit vars- I find it makes the playbooks more readable and maintainable than deciphering ssh_args line noise. I can see where it'd nice to have the "escape hatch" to do unsupported things, though, too. The trick is getting everything to beh

Re: [ansible-project] Template paths

2014-10-29 Thread Joe Adams
After some more playing, I found that if I move my roles/ directory into the folder with the playbooks, things work like they used to work. However, if I move to roles/ directory anywhere higher in the hierarchy than the playbook, it seems that the path can not be resolved inside the template.

Re: [ansible-project] Configuring Ansible to run play books through a bastion host on aws/ec2

2014-10-29 Thread erewh0n
If there was a more generic "ansible_ssh_args" parameter, it could be used however the user sees fit. It's a more flexible approach because it assumes less about how the parameter might be used or implemented in SSH. It just means a little more overhead for the user to know how to construct t

Re: [ansible-project] Configuring Ansible to run play books through a bastion host on aws/ec2

2014-10-29 Thread Matt Davis
It sounds like everyone's in agreement that the first step needs to be the ability to dynamically set the SSH proxy (and I'd argue that we need proxy_host, proxy_port, and proxy_user). I'm going to start there, since anything else would need to build on that anyway. On Wednesday, October 29, 2

Re: [ansible-project] Configuring Ansible to run play books through a bastion host on aws/ec2

2014-10-29 Thread Michael Peters
I think that would be my preference. I know in the past there's been some pushback against implementing more ansible_ssh_* parameters because that's long rabbit whole considering the number of ssh configuration parameters that exist. I agree with this point, so if adding one more (ansible_ssh_proxy

[ansible-project] PyCharm & Modules

2014-10-29 Thread Tennis Smith
Hi, Has anyone found a good way to debug ansible modules via the PyCharm debugger? -T -- 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+uns

Re: [ansible-project] Configuring Ansible to run play books through a bastion host on aws/ec2

2014-10-29 Thread Tennis Smith
How about implementing "ansible_ssh_proxy" to match "ansible_ssh_user" and "ansible_ssh_host"? -T On Wednesday, October 29, 2014 11:36:42 AM UTC-5, erewh0n wrote: > > Good point -- so configuration per play might be inflexible. I guess the > better choice is a variable that can be modified per

Re: [ansible-project] Configuring Ansible to run play books through a bastion host on aws/ec2

2014-10-29 Thread erewh0n
Good point -- so configuration per play might be inflexible. I guess the better choice is a variable that can be modified per host/group/play. Call it "ssh_args" and give it the same meaning as ANSIBLE_SSH_ARGS. Assign it per host, group or play where required and use the "-o" option to pass

Re: [ansible-project] Configuring Ansible to run play books through a bastion host on aws/ec2

2014-10-29 Thread Michael Peters
Another use case to consider (that I myself have come up against) is configuring the bastion per-host from a dynamic inventory. The servers need to use a different bastion depending on their role and location. On Wed, Oct 29, 2014 at 12:17 PM, erewh0n wrote: > Thinking on this a bit more ... it s

Re: [ansible-project] Configuring Ansible to run play books through a bastion host on aws/ec2

2014-10-29 Thread erewh0n
Thinking on this a bit more ... it seems there are two use cases here: how to dynamically change your SSH control connection during playbook execution and how to subsequently refer to the new bastion host on subsequent calls to ansible-playbook. If you could set SSH arguments per play, then I t

Re: [ansible-project] Configuring Ansible to run play books through a bastion host on aws/ec2

2014-10-29 Thread Tennis Smith
Hi Guys, I'm new to the Ansible world, and consequently, late to this discussion. Here's what I've done to address the bastion host issue. I created a small module called "cloudformation_extract_ssh_config". It requires 3 parms: - A cloudformation stack name - An AWS region name

Re: [ansible-project] Configuring Ansible to run play books through a bastion host on aws/ec2

2014-10-29 Thread erewh0n
Based on our own experience doing this (fully automated "single click" AWS VPC deployment), the only gap in the automation dynamic assignment of the bastion host during playbook execution. I would imagine the parameters could be exposed as variables that playbook developers can assign via set_

[ansible-project] SSH problems in VM

2014-10-29 Thread Rob Phoenix
I'm trying to get started with Ansible in a VM but can't get the SSH configuration right. When I try to ping 127.0.0.1 this is the output: rmphoenix@rmphoenix-VirtualBox:/$ ansible 127.0.0.1 -m ping - <127.0.0.1> ESTABLISH CONNECTION FOR USER: rmphoenix <127.0.0.1> REMOTE_MODULE ping <127.0.0

Re: [ansible-project] Template paths

2014-10-29 Thread Joe Adams
So is there no way to include from a folder other than the current role's folder? Is there no way to share/extend templates between roles? On Monday, October 27, 2014 4:25:33 PM UTC-4, Brian Coca wrote: > > It looks for the file in the "base" directory or in the templates/ > subdirectory. The "b

[ansible-project] Re: Create different sets of users on different sets of hosts

2014-10-29 Thread mephage
Paul, I recently encountered what I believe the be the same scenario. I googled around and couldn't seem to find anything to fit the scenario so I used the following approach (probably re-inventing the wheel). The key is to make use of roles, playbooks and vars separately. I've adapted your exa

Re: [ansible-project] Configuring Ansible to run play books through a bastion host on aws/ec2

2014-10-29 Thread Matt Davis
I've been hacking around this for my AWS VPCs by having my VPC setup playbook drop an ansible.cfg in the playbook dir with the appropriate ProxyCommand ssh_args set to use the jump box. When it gets to provisioning, it fails (since it can't re-read ansible.cfg), then we re-run the VPC setup and

[ansible-project] stopping ec2 spot instances

2014-10-29 Thread Bryan Hunt
I'm writing an ansible demo, showing how to provision Riak clusters, and I want to make it super self contained. With that in mind, I’ve been playing with the ec2.py inventory script, and the ansible ec2 module. Starting the nodes works great (if anyone is interested, I'm happy to share the c

[ansible-project] Connecting to an instance via Bastion Host

2014-10-29 Thread Bob Brown
So I have Ansible setup in a local machine. My local machine has ssh access to a Bastion Host, essentially an ec2 instance that I can ssh to directly with my keys The instances I want to update/change/create all need to be accessed from the Bastion Host since it has the Nat to connect into the VP

[ansible-project] include_vars not working correctly in case of remote hosts

2014-10-29 Thread vikram patil
Hello All, I am trying to setup ansible script which fetches config file from S3 and stores on remote node in home directory for User. In next task I would like to include_vars from this file but somehow include_vars fails to find file on remote machine as it always looks in my local machin

Re: [ansible-project] RHEL6.6 and ControlPersist

2014-10-29 Thread Adam Miller
On Fri, Oct 24, 2014 at 8:59 PM, Michael DeHaan wrote: > I've filed a github for now to include (in 1.8) a check to auto-disable > pipelining on RHEL 6.6+ (but not EL7), which should resolve most of the > confusion. > > We also may make it print a warning if it was on. > > But yeah, bugzilla seems

[ansible-project] loop over variables

2014-10-29 Thread kevin parker
I am using ansible to update configuration file of newly added NIC for that i have defined some variables in separate yml file */tmp/ip.yml* #first interface interface1: eth1 bootproto1: static ipaddress1: 192.168.211.249 netmask1: 255.255.255.0 gateway: 192.168.211.2 DNS1: 192.168.211.2 #se

[ansible-project] AttributeError: 'module' object has no attribute 'APIError'

2014-10-29 Thread Ananda Debnath
*# Failing on this task* - name: Build the docker Nginx image docker_image: path: "{{ docker_nginx_dir }}" state: build name: nginx TASK: [nginx | Build the docker Nginx image] *

Re: [ansible-project] Usage of 'npm install' on centos 6.3 , getting error

2014-10-29 Thread Nikita Agrawal
Hi MIchael I have installed ansible using git only. Steps are as below: $ git clone git://github.com/ansible/ansible.git --recursive$ cd ./ansible$ source ./hacking/env-setup I also updated the submodules using git submodule update --init --recursive Still getting the same error.Any help woul

Re: [ansible-project] npm is not a legal parameter at this level in an Ansible playbook

2014-10-29 Thread Nikita Agrawal
I tried running following on existing git checkout . git submodule update --init --recursive same issue still exist On Wednesday, October 29, 2014 11:45:15 AM UTC+5:30, Nikita Agrawal wrote: > > > > On Wednesday, October 29, 2014 11:33:41 AM UTC+5:30, Nikita Agrawal wrote: >> >> Hi Michael, >> >>

Re: [ansible-project] Iterating through a list of names to create EC2 instances

2014-10-29 Thread Sankalp Khare
I must also add that I've got a central group_vars/all file from which I pull all the variables like region, instance types, environment specific load balancer names, etc. On Wednesday, 29 October 2014 04:02:19 UTC-5, Sankalp Khare wrote: > > Hi Renaud, > > I totally get what you are looking to

Re: [ansible-project] Iterating through a list of names to create EC2 instances

2014-10-29 Thread Sankalp Khare
Hi Renaud, I totally get what you are looking to achieve. Perhaps you've achieved it already in the past year. Assuming that you are happy with specifying a start index = x and a count = N to produce machines with names containing x, x+1, x+2, ... x+N, I think the following playbook example wil

Re: [ansible-project] Variable of variable doesn't work in ansible 1.4

2014-10-29 Thread Sankalp Khare
I second Giorgio. Dmitry, you're a lifesaver :D On Friday, 6 December 2013 03:46:13 UTC-6, Giorgio Crivellari wrote: > > > Dmitry you're a f* genius!! > > Michael, please add Dimitry example in variables website documentation > page... many users will appreciate! > > Thanks guys! > Giorgio >