[ansible-project] Re: modifying members of local groups in windows

2016-10-26 Thread Mike Devlin

Thanks, those would be handy.

Mike

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/92f6e8ba-24e5-4d3b-b060-9aaadda1e101%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Linux aliases in shell...

2016-10-26 Thread Sonny Chee
Thanks Paul, that makes sense.

Is it possible to set this behavior within Ansible?  I tried the following 
without any luck...

  shell: rs -z blah_blah
  args:
creates: "{{ current_flags }}/{{ item }}_{{ ansible_date_time.date }}"
executable: /bin/bash +O expand_aliases


On Tuesday, October 25, 2016 at 1:29:18 AM UTC-7, Paul Tötterman wrote:
>
> Is there a way to make aliases available in a shell?  I tried sourcing a 
>> file with aliases before invoking my alias with no luck
>>
>
> https://linux.die.net/man/1/bash :
>
>  Aliases  are  not  expanded  when  the shell is not interactive, unless 
>> the expand_aliases shell option is set using shopt
>
>
> Cheers,
> Paul 
>

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3dec240a-daac-4307-9409-4d6280dff71e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: modifying members of local groups in windows

2016-10-26 Thread Matt Davis
Not currently- a set of AD management modules are on the roadmap for 2.3, 
and adding a group_members capability to win_group would probably be the 
sanest way to deal with that particular request...

-Matt

On Wednesday, October 26, 2016 at 3:16:44 PM UTC-7, Mike Devlin wrote:
>
> the win_group module looks like it only lets you create or remove a group, 
> and win_user is for add/modify/removing local users.  Is there a way to add 
> an active directory group as a member of a local group that I am not seeing?
>
> Thanks
> Mike
>

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a83340a5-c277-41c5-9d3d-7270e666d86b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] modifying members of local groups in windows

2016-10-26 Thread Mike Devlin
the win_group module looks like it only lets you create or remove a group, 
and win_user is for add/modify/removing local users.  Is there a way to add 
an active directory group as a member of a local group that I am not seeing?

Thanks
Mike

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8259c5fc-af74-4043-b03d-d9bc37c6ffa2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: group_vars and ansible's patterns - suggestions please!

2016-10-26 Thread Allen Sanabria
I use to use group_vars/. Instead I use vars/ now. Since include_vars 
plugin now supports directories and you can limit the depth of the include. 
Here is an example on how I manage vars/ 
today https://github.com/linuxdynasty/ansible-examples/tree/master/playbooks

On Wednesday, October 26, 2016 at 1:39:21 PM UTC-7, Dan Rough wrote:
>
> Hi,
>
> I'd like to know how others are dealing with keeping their group_vars 
> files granular. Ours have become a little unwieldily and we're considering 
> approaches to breaking them apart.
>
> When we provision a server, we assign it to a number of groups. Among 
> those groups, each server is added to at least three groups. Firstly, we 
> add it to a group which defines its role, for example app_server. Another 
> group represents the location of the DC that the server is in, which might 
> be LON, for example. Thirdly, we also add it to a group which denotes 
> whether it is a production server or a test server, prod, for example. That 
> allows us to use ansible's patterns when we're configuring the server to do 
> something like this: - hosts: "prod::_server" or - hosts: 
> "prod::_server".
>
> We have a variables which need to be defined based on these three 
> variables, Environment, Region and Role. Our current thinking is to create 
> a group_vars file for each of the possible combinations, 
> prod_LON_app_server, for example. The affect of this decision will mean 
> that we're going to see an explosion in the number of groups a server is 
> added to, and the number of group_vars files we maintain.
>
> Before we take this route, can anyone tell me if we're missing a trick? Is 
> there a technique that we're missing?
>
> Thanks!
>
> Dan.
>

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3b610f47-2e53-4196-8710-024fe7e3f01b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: group_vars and ansible's patterns - suggestions please!

2016-10-26 Thread Dan Rough
That's a good idea. Thanks! I hadn't thought of that. That will simplify things 
in one or two locations.

> On 26 Oct 2016, at 22:01, Alexander H. Laughlin  
> wrote:
> 
> Hi Dan,
> 
> Why not store the values in a dictionary and just pull the values you need 
> for any given server based on its key?
> 
> Alex
> 
>> On Wednesday, October 26, 2016 at 1:39:21 PM UTC-7, Dan Rough wrote:
>> Hi,
>> 
>> I'd like to know how others are dealing with keeping their group_vars files 
>> granular. Ours have become a little unwieldily and we're considering 
>> approaches to breaking them apart.
>> 
>> When we provision a server, we assign it to a number of groups. Among those 
>> groups, each server is added to at least three groups. Firstly, we add it to 
>> a group which defines its role, for example app_server. Another group 
>> represents the location of the DC that the server is in, which might be LON, 
>> for example. Thirdly, we also add it to a group which denotes whether it is 
>> a production server or a test server, prod, for example. That allows us to 
>> use ansible's patterns when we're configuring the server to do something 
>> like this: - hosts: "prod::_server" or - hosts: 
>> "prod::_server".
>> 
>> We have a variables which need to be defined based on these three variables, 
>> Environment, Region and Role. Our current thinking is to create a group_vars 
>> file for each of the possible combinations, prod_LON_app_server, for 
>> example. The affect of this decision will mean that we're going to see an 
>> explosion in the number of groups a server is added to, and the number of 
>> group_vars files we maintain.
>> 
>> Before we take this route, can anyone tell me if we're missing a trick? Is 
>> there a technique that we're missing?
>> 
>> Thanks!
>> 
>> Dan.
> 
>   
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Ansible Project" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/ansible-project/_Fvptfvs-gk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/18a8673f-c17a-4ed1-ad15-45c438402166%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/922B0762-DDB2-45EC-B688-60CB004F2C14%40gamevy.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: group_vars and ansible's patterns - suggestions please!

2016-10-26 Thread Alexander H. Laughlin
Hi Dan,

Why not store the values in a dictionary and just pull the values you need 
for any given server based on its key?

Alex

On Wednesday, October 26, 2016 at 1:39:21 PM UTC-7, Dan Rough wrote:
>
> Hi,
>
> I'd like to know how others are dealing with keeping their group_vars 
> files granular. Ours have become a little unwieldily and we're considering 
> approaches to breaking them apart.
>
> When we provision a server, we assign it to a number of groups. Among 
> those groups, each server is added to at least three groups. Firstly, we 
> add it to a group which defines its role, for example app_server. Another 
> group represents the location of the DC that the server is in, which might 
> be LON, for example. Thirdly, we also add it to a group which denotes 
> whether it is a production server or a test server, prod, for example. That 
> allows us to use ansible's patterns when we're configuring the server to do 
> something like this: - hosts: "prod::_server" or - hosts: 
> "prod::_server".
>
> We have a variables which need to be defined based on these three 
> variables, Environment, Region and Role. Our current thinking is to create 
> a group_vars file for each of the possible combinations, 
> prod_LON_app_server, for example. The affect of this decision will mean 
> that we're going to see an explosion in the number of groups a server is 
> added to, and the number of group_vars files we maintain.
>
> Before we take this route, can anyone tell me if we're missing a trick? Is 
> there a technique that we're missing?
>
> Thanks!
>
> Dan.
>

-- 

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/18a8673f-c17a-4ed1-ad15-45c438402166%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Question about organizing roles and playbooks

2016-10-26 Thread Dan Rough
If I understand your question correctly, then why not just have two 
playbooks? We have an infrastructure.yml playbook which provisions a server 
for us. We also have another playbook which makes alterations to that 
server dependent on its role. For example, in our case when we provision a 
Jenkins server, I run the infrastructure.yml playbook which targets all 
servers (qa-machines in your case) in its host specification (remember that 
you can use ansible's limit 

 
attribute to narrow the scope of the playbook from the command line) and 
then I run jenkins.yml afterwards which targets just the jenkins server 
(jenkins-slaves in your example).

On Wednesday, 26 October 2016 16:28:45 UTC+1, thok...@gmail.com wrote:
>
> Hello, 
> How to best model the following scenario:
>
> I have a set of hosts in one playbook.
>
> [qa-machines]
> HostA
> HostB
> HostC
>
> I have a subset of these hosts that should receive additional roles.
>
> [jenkins-slaves]
> HostC
>
> I have a Vagrantfile that I would like to use to set up one host of each 
> category.
>
> Including first playbook from the second one does not work, because I 
> cannot parameterize the hosts when including a playbook.
>
> What I would like to achieve is, when the "setup-qa-machine" playbook is 
> changed, it does not require to change in the "setup-jenkins-slave" 
> playbook, which would be the case if I repeated the common roles.
>
> it feels a bit like I was not seeing the obvious right now, so any help is 
> appreciated. Thanks!
>

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2a2563c9-cc01-476a-b981-042a8e1e082a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] group_vars and ansible's patterns - suggestions please!

2016-10-26 Thread Dan Rough
Hi,

I'd like to know how others are dealing with keeping their group_vars files 
granular. Ours have become a little unwieldily and we're considering 
approaches to breaking them apart.

When we provision a server, we assign it to a number of groups. Among those 
groups, each server is added to at least three groups. Firstly, we add it 
to a group which defines its role, for example app_server. Another group 
represents the location of the DC that the server is in, which might be LON, 
for example. Thirdly, we also add it to a group which denotes whether it is 
a production server or a test server, prod, for example. That allows us to 
use ansible's patterns when we're configuring the server to do something 
like this: - hosts: "prod::_server" or - hosts: 
"prod::_server".

We have a variables which need to be defined based on these three 
variables, Environment, Region and Role. Our current thinking is to create 
a group_vars file for each of the possible combinations, prod_LON_app_server, 
for example. The affect of this decision will mean that we're going to see 
an explosion in the number of groups a server is added to, and the number 
of group_vars files we maintain.

Before we take this route, can anyone tell me if we're missing a trick? Is 
there a technique that we're missing?

Thanks!

Dan.

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/498f1b72-39b0-4b67-81bc-d1bf6bae4c2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Facing Problem while creating Kinesis event source mapping for Lambda

2016-10-26 Thread Allen Sanabria
My apologies, you meant a completely different module. Disregard my last
comment.

On Wed, Oct 26, 2016 at 9:34 AM, Allen Sanabria 
wrote:

> Can you show the entire module as you are using it please? This is an
> example on how I am using it.
>
> ​
>
> On Tue, Oct 25, 2016 at 9:21 PM, Bharath Kumar 
> wrote:
>
>> Hello,
>>
>> Can any one help with the following error ?
>>
>> "msg": "Module alias error: internal error: required and default are
>> mutually exclusive for event_source"
>>
>> --
>> 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 to ansible-project@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/ansible-project/58b40fbd-679d-4348-9ad4-2250407e6aa0%
>> 40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAH2deCYPnuSk-u3Y3ZZR%3DL2KxA98OBuZWPYB-QiTRW%3DCZg5xHg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Facing Problem while creating Kinesis event source mapping for Lambda

2016-10-26 Thread Allen Sanabria
Can you show the entire module as you are using it please? This is an
example on how I am using it.

​

On Tue, Oct 25, 2016 at 9:21 PM, Bharath Kumar  wrote:

> Hello,
>
> Can any one help with the following error ?
>
> "msg": "Module alias error: internal error: required and default are
> mutually exclusive for event_source"
>
> --
> 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 to ansible-project@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/ansible-project/58b40fbd-679d-4348-9ad4-2250407e6aa0%40googlegroups.
> com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAH2deCYubAQZC%3DfVHN-3ytZB-8ZT7qTWvW4Mm7Vn4seG0u6Y4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Facing Problem while creating Kinesis event source mapping for Lambda

2016-10-26 Thread Bharath Kumar
Hello,

Can any one help with the following error ?

"msg": "Module alias error: internal error: required and default are 
mutually exclusive for event_source"

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/58b40fbd-679d-4348-9ad4-2250407e6aa0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Ansible target not logging to syslog

2016-10-26 Thread Andy Freeland
According to the docs 
(http://docs.ansible.com/ansible/intro_configuration.html#log-path), if 
`log_path` is not set, Ansible will "record module arguments called to the 
syslog of managed machines". Shouldn't that still be happening?

On Tuesday, September 13, 2016 at 10:29:00 AM UTC-7, Brian Coca wrote:
>
> The -v option ONLY affects the output you see on the controller. You can 
> set debug in ansible.cfg or ANSIBLE_DEBUG=1 in your environment before 
> running ansible to force some logging on the module side. This mostly 
> affects any commands you shell out for, be mindful that not all modules 
> shell out nor does this account for every action in those that do.
>
>
> --
> 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+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/06807c77-9073-468a-a450-ecc69cdd41ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Playbook can't connect to EC2 instance, but SSH works fine?

2016-10-26 Thread Eric Campusano
New to Ansible but I'm really enjoying working with it so far. I've started 
writing a playbook that creates an EC2 instance and then attempts to 
connect to it and configure it. For some reason it's failing to connect, 
even though it appears to be using the correct key and attempting to 
connect as the correct user. It's also using the correct hostname. I turned 
verbose output on and I still don't see what the issue is. Can anyone 
suggest what the issue might be?

I provisioned an EC2 instance and now I want to connect to it:

Here's my play:

# Configure instances
- include: configure-ireland.yml  #This just installs a single package, 
httpd, nothing fancy
  vars:
ansible_ssh_user: ec2-user
ansible_ssh_private_key_file: keys/eric_eu_west_1.pem

Here's the output of ansible-playbook -v myplay.yml when it fails to 
connect to my instance via ssh:

TASK [setup] 
***
 ESTABLISH SSH 
CONNECTION FOR USER: ec2-user
 ESTABLISH SSH 
CONNECTION FOR USER: ec2-user
 SSH: ansible.cfg 
set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
 ESTABLISH SSH 
CONNECTION FOR USER: ec2-user
 SSH: 
ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: 
(-o)(IdentityFile="keys/eric_eu_west_1.p
em")
 SSH: 
ansible_password/ansible_ssh_pass not set: 
(-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi

-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
 SSH: 
ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: 
(-o)(User=ec2-user)
 SSH: 
ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
 SSH: PlayContext 
set ssh_common_args: ()
 SSH: ansible.cfg 
set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
 SSH: 
ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: 
(-o)(IdentityFile="keys/eric_eu_west_1.$
em")
 SSH: ansible.cfg 
set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
 SSH: 
ansible_password/ansible_ssh_pass not set: 
(-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssap$

-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
 SSH: 
ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: 
(-o)(IdentityFile="keys/eric_eu_west_1.$
em")
 SSH: 
ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: 
(-o)(User=ec2-user)
 SSH: 
ansible_password/ansible_ssh_pass not set: 
(-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssap$

-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
 SSH: 
ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
 SSH: 
ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: 
(-o)(User=ec2-user)
 SSH: 
ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
 SSH: PlayContext 
set ssh_common_args: ()
 SSH: PlayContext 
set ssh_common_args: ()
 SSH: PlayContext 
set ssh_extra_args: ()
 SSH: PlayContext 
set ssh_extra_args: ()
 SSH: found only 
ControlPersist; added ControlPath: 
(-o)(ControlPath=/home/campee/.ansible/cp/ansible-ssh-%h-%p-%r)
 SSH: found only 
ControlPersist; added ControlPath: 
(-o)(ControlPath=/home/campee/.ansible/cp/ansible-ssh-%h-%p-%r)
 SSH: EXEC ssh -C 
-vvv -o ControlMaster=auto -o ControlPersist=60s -o 
'IdentityFile="keys/eric_eu_west_1.pem"' -o KbdInte$
activeAuthentication=no -o 
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
-o PasswordAuthentication=no -o User=ec2-user -o ConnectTimeout=10 -o C$
ntrolPath=/home/campee/.ansible/cp/ansible-ssh-%h-%p-%r 
ec2-54-194-77-121.eu-west-1.compute.amazonaws.com '/bin/sh -c '"'"'( umask 
77 && mkdir -p "` echo $HOME/.ansible/tmp$
ansible-tmp-1477363326.38-254627066289692 `" && echo 
ansible-tmp-1477363326.38-254627066289692="` echo 
$HOME/.ansible/tmp/ansible-tmp-1477363326.38-254627066289692 `" ) && $sleep 
0'"'"''

 SSH: EXEC ssh -C 
-vvv -o ControlMaster=auto -o ControlPersist=60s -o 
'IdentityFile="keys/eric_eu_west_1.pem"' -o KbdInte$
activeAuthentication=no -o 
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
-o PasswordAuthentication=no -o User=ec2-user -o ConnectTimeout=10 -o C$
ntrolPath=/home/campee/.ansible/cp/ansible-ssh-%h-%p-%r 
ec2-54-171-76-221.eu-west-1.compute.amazonaws.com '/bin/sh -c '"'"'( umask 
77 && mkdir -p "` echo $HOME/.ansible/tmp$
ansible-tmp-1477363326.38-141287772563957 `" && echo 
ansible-tmp-1477363326.38-141287772563957="` echo 
$HOME/.ansible/tmp/ansible-tmp-1477363326.38-141287772563957 `" ) && s
leep 0'"'"''
 SSH: PlayContext 
set ssh_extra_args: ()
 SSH: found only 
ControlPersist; added ControlPath: 
(-o)(ControlPath=/home/campee/.ansible/cp/ansible-ssh-%h-%p-%r)
 SSH: EXEC ssh -C 
-vvv -o ControlMaster=auto -o ControlPersist=60s -o 

[ansible-project] Lambda Kinesis stream event mapping

2016-10-26 Thread Bharat K
I am creating lambda trigger for kinesis stream however getting below 
error. 

"msg": "Module alias error: internal error: required and default are 
mutually exclusive for event_source"


Code: 


- hosts: control

  gather_facts: no

  vars:

state: present

function_names: from_Kinesis

  tasks:

  - name: Kinesis stream event mapping

lambda_event:

  state: "{{ state | default('present') }}"

  event_source: stream

  function_name: "{{ function_names }}"

  source_params:

source_arn: 
arn:aws:kinesis:us-west-2:xxx:stream/StockTradeStream

enabled: True

batch_size: 100

starting_position: TRIM_HORIZON

  - name: show source event config

debug: var=lambda_stream_events

Appreciate your input.

Thanks !!

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f5c37ec9-3a96-4a89-87df-b62a2804c825%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] I want to use the "target" also as a variable not just for hosts file

2016-10-26 Thread Gb Gb
ansible-playbook msi_install.yml -vvv

The problems( in red)
- the find command is OK
- but instead of getting the value of the target host like "199.121.121.1" 
i am getting "win_host1"
- where should I define the varible "repoPath" i have few more variable 
related only for the localhost like "repoReleasePath" etc...(alll mounted 
in linux to windows)

file name: win_global.yml
---
 - include: "msi_install.yml comp_name=COMP1 target=win_host1"
 - include: "msi_install.yml comp_name=COMP2 target=win_host1"
 - include: "msi_install.yml comp_name=COMP3 target=win_host2"
 - include: "msi_install.yml comp_name=COMP4 target=win_host2"



file name: hosts.yml
---
[localhost]

[win_servers]
win_host1: ansible_host=199.121.121.1
win_host1: ansible_host=199.199.33.33



file name: msi_install.yml
---
 - hosts: localhost
   tasks:
   name: find latest msi (mounted in linux)
# the repoPath is mounting also in linux to windows
   shell: find {{repoPath}} -type f -iname  "{{comp_name}}*" | tail -n1
   register: msi_name
   
   name: copy msi to target window host
   shell: cp {{ hostvars.localhost.msi_name.stdout }} {{ target }}

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5785aa0d-750e-46d9-838e-c331f8bf03b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] facts from set_fact aren't working

2016-10-26 Thread Dayton Jones
I'm setting 2 facts from a custom filter, which appears to be working, but 
when I go to use those facts in the playbook they aren't there...

  set_fact:
ilom_gw: "{{ ilom_ip | ilom_net(item.gateway,item.mask) }}"
ilom_mask: "{{ ilom_ip | ilom_net(item.gateway,item.mask, 
return_value='mask') }}"
  with_items: iloms

here's the output of that task:

{

"changed": false,

"msg": "All items completed",

"results": [

{

"_ansible_no_log": false,

"ansible_facts": {

*"ilom_gw": "10.224.64.1",*

*"ilom_mask": "255.255.248.0"*

},


as you can see both ilom_gw and ilom_mask are set here, but then:


  debug: var=ilom_gw

[mgmt_port:debug] ilom_gw

2016-10-26 15:31:29+00:00 (0:01:05)

Changed = False

JSON: {

"_ansible_no_log": false,

"_ansible_verbose_always": true,

"changed": false, 

 *"ilom_gw": false*

}


  debug: var=ilom_mask

[mgmt_port:debug] ilom_mask

2016-10-26 15:31:30+00:00 (0:01:06)

Changed = False

JSON: {

"_ansible_no_log": false,

"_ansible_verbose_always": true,

"changed": false,

*"ilom_mask": false*

}



And I swear when I tested this yesterday it worked as expected, but then 
today it's broken... what am I missing? 

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/38ceb39b-bd3a-4276-8fd6-77aa6702ec73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Question about organizing roles and playbooks

2016-10-26 Thread thokari81
Hello, 
How to best model the following scenario:

I have a set of hosts in one playbook.

[qa-machines]
HostA
HostB
HostC

I have a subset of these hosts that should receive additional roles.

[jenkins-slaves]
HostC

I have a Vagrantfile that I would like to use to set up one host of each 
category.

Including first playbook from the second one does not work, because I 
cannot parameterize the hosts when including a playbook.

What I would like to achieve is, when the "setup-qa-machine" playbook is 
changed, it does not require to change in the "setup-jenkins-slave" 
playbook, which would be the case if I repeated the common roles.

it feels a bit like I was not seeing the obvious right now, so any help is 
appreciated. Thanks!

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/08e2a122-b866-40bd-9a2b-fbf308818f0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: How can i specify the same target host twice or more in my playbook ?

2016-10-26 Thread 'J Hawkesworth' via Ansible Project
I think you are going to have to change, or at least add something to do 
this.

I would do this by adding a temporary inventory file and group vars.  

If you have inventory with groups like

[webservers]
host1 app_folder=/opt/instance1


[database]
host1 app_folder=/opt/instance2


then you can have a playbook that does something like the following:

hosts: webservers:
roles:
   - install_app


hosts: database
roles:
   - install_app


if install_app uses app_folder
as the installation dir for app then you can get 2 

Don't forget you can set defaults in your role so that you only have to 
provide an override for the hosts that need it.

I have an inventory file which has all the same group names as my test and 
production inventories, but only 1 actual host, which points at a virtual 
machine which I can revert back to a 'blank' snapshot.  I use this a lot 
for developing my provisioning playbooks.

Hope this helps,

Jon

On Wednesday, October 26, 2016 at 10:05:19 AM UTC+1, ishan jain wrote:
>
> I have a situation for which we have decided to allow multiple instances 
> of the same app to run on same host machines. I do not want to modify my 
> playbook or inventory to incorporate this temporary hack and was wondering 
> if i can do that simply by modifying host list and some of the variables. 
> So i need to know two main things:
>
> 1) Is there a way i can repeat a target host in my playbook ? I have tried 
> repeating the hostname in the comma separated list but that doesn't work
>
> 2) How can i override some variables for this repeated host ?
>

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e0cd4e8c-7282-4a55-889e-2fb5bc2e28a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] How can i specify the same target host twice or more in my playbook ?

2016-10-26 Thread ishan jain
I have a situation for which we have decided to allow multiple instances of 
the same app to run on same host machines. I do not want to modify my 
playbook or inventory to incorporate this temporary hack and was wondering 
if i can do that simply by modifying host list and some of the variables. 
So i need to know two main things:

1) Is there a way i can repeat a target host in my playbook ? I have tried 
repeating the hostname in the comma separated list but that doesn't work

2) How can i override some variables for this repeated host ?

-- 
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 to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6fef639f-deed-44c8-b3ba-22214381151f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.