Re: [ansible-project] When using ec2 or rax in a role, facts set following an add_host loop are lost when execution returns to the calling playbook

2015-08-19 Thread Mark Casey
Awesome, thanks for pointing that out. I'll try some things and post back later with how it goes. It may be quite a while, but I kind of suspect curiosity will get the best of me on this one and I may end up trying it from devel. Thank you, Mark On Wednesday, August 19, 2015 at 10:44:54 AM UT

[ansible-project] When using ec2 or rax in a role, facts set following an add_host loop are lost when execution returns to the calling playbook

2015-08-18 Thread Mark Casey
Hello, I'm actually revisiting a problem I originally just worked around... maybe 18 to 24 months ago. I just now did some searching of the list, but there were just pages and pages for most searches I tried so apologies if this is a solved thing and I missed it. What I do now to deploy to clo

Re: [ansible-project] Can I slice an existing group within a play (without a unique attribute to group_by)?

2015-05-26 Thread Mark Casey
I forgot to bold the new tasks after I said they'd be bold... In case it isn't very obvious they are the only two shown that use 'with_nested:' On Tuesday, May 26, 2015 at 12:02:44 PM UTC-5, Mark Casey wrote: > > James (and list), > > Thanks for the feedback o

Re: [ansible-project] Can I slice an existing group within a play (without a unique attribute to group_by)?

2015-05-26 Thread Mark Casey
t; roles: > - role: '{{ provider }}/{{ provider }}_add' > type: consul > count: 1 > > Thanks, Mark On Thursday, December 11, 2014 at 2:04:08 PM UTC-6, James Cammarata wrote: > > Hi Mark, the way you're planning is the correct way to do this, howe

[ansible-project] using failed_when: with changed_when:

2015-01-18 Thread Mark Casey
gt; register: res > failed_when: "res.rc == 2" > changed_when: "res.rc == 0" > with_items: gce.instance_data > > and it seems to work or at least I hope so > > On Thursday, January 15, 2015 at 11:19:05 AM UTC-8, Mark Casey wrote: >> >&g

[ansible-project] using failed_when: with changed_when:

2015-01-15 Thread Mark Casey
Hello list, Do 'failed_when:' and 'changed_when:' effect one another? (i.e. a failed task returns changed instead of failed because you'd specified both flags or vice versa?) I guess I'm assuming that in any case 'failed' supersedes 'changed', and these flags just change the definition of thos

[ansible-project] Can I slice an existing group within a play (without a unique attribute to group_by)?

2014-12-11 Thread Mark Casey
Hello, I have a group of servers in EC2 that will be a cluster of Consul server nodes, but on some of them I also want to run LDAP. I believe in a static inventory file this would be: [consul] server1 server2 server3 [ldap] server1 server 2 I'm using the pattern from the EC2 guide of calling

Re: [ansible-project] Re: Trouble with quoting a shellshock test

2014-09-28 Thread Mark Casey
ve made a simple role, it is based and code samples you provided I >>> hope you will find it useful >>> https://github.com/hostmaster/check_shellshock >>> >>> -- Best, Igor >>> >>> On Sat, Sep 27, 2014 at 6:02 AM, Mark Casey >> > wrot

[ansible-project] Re: Trouble with quoting a shellshock test

2014-09-26 Thread Mark Casey
Oh... the official source of the commands was: https://access.redhat.com/articles/1200223, but someone was nice enough to combine them in: https://bugzilla.redhat.com/show_bug.cgi?id=1141597#c47 On Friday, September 26, 2014 9:00:57 PM UTC-5, Mark Casey wrote: > > I'm trying to write

[ansible-project] Trouble with quoting a shellshock test

2014-09-26 Thread Mark Casey
I'm trying to write an Ansible task to check for both CVE-2014-6271 and CVE-2014-7169 as I haven't been able to find one pre-made. This command should check both but for the life of me I can't get the escaped single quote past the parser... I've tried some variants of "shell: >" and "shell: |"

Re: [ansible-project] Re: Initial provisioning/user setup via root remote_user, continued CM via other remote_user?

2014-07-10 Thread Mark Casey
> > Do you actually need to detect at all? If you want to be able to remove the original access (ssh as root, or perhaps a default user like 'ubuntu') then yes, I'd think you have to know whether the change has already been made or not. If you just want to add access, and not revoke the initi

Re: [ansible-project] rax: change meta on existing cloudserver?

2014-04-22 Thread Mark Casey
right now has to be a > comma separated list, not an actual YAML list (this will likely change in > the future, and the rax module will just coerce an actual list to the > joined CSV string. > > -- > Matt Martz > ma...@sivel.net > > On April 22, 2014 at 5:30:06 PM, Mark C

[ansible-project] rax: change meta on existing cloudserver?

2014-04-22 Thread Mark Casey
Hello all, Does the rax set of modules have a module parallel to the ec2_tag module in AWS, or is there some way I should just re-call the rax module to change tags or groups of an existing host? ...and if I could sneak in a corollary: Can I list (/add/remove) more than one group within the ra

Re: [ansible-project] Can I remove past ec2 idempotency/request ids??

2014-03-26 Thread Mark Casey
again! On Wednesday, March 26, 2014 9:14:51 AM UTC-5, James Tanner wrote: > > I would first try to make the instance_tags a dictionary instead of a > "dictionary-like" string: > > instance_tags: > foo: bar > baz: bang > who: doo > > And use t

Re: [ansible-project] Can I remove past ec2 idempotency/request ids??

2014-03-26 Thread Mark Casey
}}", "ec2serverPod_and_ec2type":"{{ serverPod }}_{{ type }}", > "provisioned":"False", "Name":"{{ virtualhostFullName }}_{{ type }}"}' > exact_count: "{{ count }}" > count_tag: ec2serverPod_and

[ansible-project] Using Ansible for backups?

2014-03-25 Thread Mark Casey
Has any wisdom been established by the community or Ansible proper on which parts of a "backups infrastructure", if any, Ansible could/should have a part in? Ansible deployments obviously maintain quite a lot of data for deployment and life-cycle management that could be very useful to backup s

Re: [ansible-project] Re: Traceback on group_by

2014-03-24 Thread Mark Casey
wrote: > > Hi Mark/James, > Do you guys know if there was a bug filed on this? I'm running into a > similar thing in 1.5.3. If not i'll try and put together a minimal > playbook to reproduce. > > thanks, > matt > > > > On Tue, Feb 4, 2014 at 6:50 PM

Re: [ansible-project] group_vars appear to be skipped for implicit localhost when using inventory plugin

2014-03-18 Thread Mark Casey
icit localhost feature is new, and it's not technically part of > any group, so I'm not too surprised it doesn't read group variables for the > host. > > If you'd like to file a github ticket we can look into making sure it > gets variables from the "all&q

[ansible-project] Re: ec2 module works...ec2.py does not (confused!)

2014-03-18 Thread Mark Casey
uary 15, 2014 10:29:42 PM UTC-6, Mark Casey wrote: > > FWIW...here is that output... > > bobtheuser@ip-172-20-fake-124:~/jobs/thajob/workspace/bin/devtools/ansible$ > ./ec2.py --list --refresh-cache > Looks like AWS is down again: > EC2ResponseError: 401 Unauthorized >

[ansible-project] group_vars appear to be skipped for implicit localhost when using inventory plugin

2014-03-18 Thread Mark Casey
Hello list, I think I'm seeing "group_vars/all" get skipped for implicit localhost when using the ec2.py inventory script. I've tried writing a few simplified example plays but they all worked, so I'm either missing something obvious or the issue was in a part I tried to stub out. So here is wh

Re: [ansible-project] Can I remove past ec2 idempotency/request ids??

2014-03-08 Thread Mark Casey
referred. > > > > > On Fri, Mar 7, 2014 at 6:39 PM, Mark Casey > > wrote: > >> Hello, >> >> When creating ec2 instances we have the "id" field for idempotency. I was >> wondering how long previously-used ids linger for and, if they auto-pr

[ansible-project] Can I remove past ec2 idempotency/request ids??

2014-03-07 Thread Mark Casey
Hello, When creating ec2 instances we have the "id" field for idempotency. I was wondering how long previously-used ids linger for and, if they auto-prune, whether they can be removed early/manually. Thank you, Mark -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] getting the fqdns of all the hosts in a group

2014-02-07 Thread Mark Casey
I was trying to get IPs from multiple hosts instead of their hostnames. I found a solution from another thread and adapted it. (...and am just cross linking in the hopes of helping the next person http://xkcd.com/979/ :) https://groups.google.com/d/msg/ansible-project/LWRGQQYPtqs/b7rOazw36vQJ H

Re: [ansible-project] How to have each node get a different variable from an array

2014-02-07 Thread Mark Casey
Thanks for sharing this... just saved me quite a bit of frustration. I was trying something along these lines (https://groups.google.com/d/msg/ansible-project/YTF6Up3kaKw/xHASvMROhegJ) to get a list of private IPs for a MySQL cluster config, and have ended up with: [mysqld] > {% set ip_list =

[ansible-project] Re: Traceback on group_by

2014-02-04 Thread Mark Casey
nk you, Mark On Monday, February 3, 2014 4:01:14 PM UTC-6, Mark Casey wrote: > > Hello, > > I'm getting a traceback on a group_by, which is intended to create a group > named after each of a host's existing groups, prepended by a variable that > is being set with '-e

Re: [ansible-project] Cannot use add_host when using ec2.py?

2014-02-03 Thread Mark Casey
I swapped the add_host tasks for some group_by's and its working. Thanks, Mark On Monday, January 27, 2014 5:06:58 PM UTC-6, Mark Casey wrote: > > Ok, saw the note on the github ticket (thanks, and sorry if filing it was > premature). Not sure whether to continue here or there

[ansible-project] Traceback on group_by

2014-02-03 Thread Mark Casey
Hello, I'm getting a traceback on a group_by, which is intended to create a group named after each of a host's existing groups, prepended by a variable that is being set with '-e' at invocation (a site/host-group ID): - name: vagrant | Create provider-agnostic ID_and_type group > group_by: ke

Re: [ansible-project] Cannot use add_host when using ec2.py?

2014-01-27 Thread Mark Casey
014 3:25:37 PM UTC-6, Mark Casey wrote: > > Bah! Obfuscation gone wrong...I never know how much is prudent to remove. > :) > > In my last message, the group webnode==apache2 and db==mysql..I missed > some of them when replacing. > > Sorry! > > On Monday, J

Re: [ansible-project] Cannot use add_host when using ec2.py?

2014-01-27 Thread Mark Casey
Bah! Obfuscation gone wrong...I never know how much is prudent to remove. :) In my last message, the group webnode==apache2 and db==mysql..I missed some of them when replacing. Sorry! On Monday, January 27, 2014 3:23:11 PM UTC-6, Mark Casey wrote: > > Yea, seems like it should w

Re: [ansible-project] Cannot use add_host when using ec2.py?

2014-01-27 Thread Mark Casey
;: "" > } > <172.31.45.13> ESTABLISH CONNECTION FOR USER: root > ok: [172.31.45.13] => { > "group_names": [ > "***", > "***", > "***", > "***"

[ansible-project] Cannot use add_host when using ec2.py?

2014-01-27 Thread Mark Casey
Is it normal for add_host to not work when using ec2.py? I'm in a playbook that is using ec2.py as the inventory source and I'm trying to create a few groups dynamically using ec2 tag values. When I run debug on the hostvars afterwards, the new group name isn't there. *Inventory output:* > jen

[ansible-project] Re: Includes from a secured file - can we continue if the file is unreadable?

2014-01-27 Thread Mark Casey
oops...typo...that'd be: - shell: chdir={{ secret_stuff_folder }} sed -e '2s/#secret/secret/' mysql_accounts.yml*.secret* On Monday, January 27, 2014 2:09:53 AM UTC-6, Mark Casey wrote: > > With regard to your wanting to continue gracefully after trying to import > an e

[ansible-project] Re: Includes from a secured file - can we continue if the file is unreadable?

2014-01-27 Thread Mark Casey
With regard to your wanting to continue gracefully after trying to import an encrypted file... This is kind of a gross hack, but it might be a starting point. Specifically, you might consider putting a comment in the top of the unencrypted form of the secured vars file: --- > #secret > > passwo

[ansible-project] Re: ec2 module works...ec2.py does not (confused!)

2014-01-15 Thread Mark Casey
t;: "test9", "ec2_dns_name": "ec2-54-fake-141-999.us-west-2.compute.amazonaws.com", "ec2_ebs_optimized": false, On Wednesday, January 15, 2014 10:20:55 PM UTC-6, Mark Casey wrote: > > Heh, was just looking at this... > > I thin

[ansible-project] Re: ec2 module works...ec2.py does not (confused!)

2014-01-15 Thread Mark Casey
aws > > Then, using the credentials returned from the metadata service, query EC2: > > aws ec2 describe-instances > > That should help you determine if the problem is indeed with the > credentials, or with ec2.py. > > -Jharrod > > On Wednesday, January 15, 2014 10:

[ansible-project] Re: ec2 module works...ec2.py does not (confused!)

2014-01-15 Thread Mark Casey
t exported at all. I also made sure and they are exported as the same names on the host that is working. Finally, I downloaded a new copy of ec2.py and ec2.ini today from GitHub, but it didn't change anything. On Tuesday, January 14, 2014 4:49:53 PM UTC-6, Mark Casey wrote: > > Thank

[ansible-project] Re: ec2 module works...ec2.py does not (confused!)

2014-01-14 Thread Mark Casey
Thanks for all the great suggestions! Not sure if it will be today but I'll try them and post back how I get on. -- 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

[ansible-project] Re: ec2 module works...ec2.py does not (confused!)

2014-01-13 Thread Mark Casey
mpute.internal' >>> I'm exporting credentials in bash for ec2.py, and added them temporarily to /etc/boto.cfg for the test on the console. Thank you, Mark On Monday, January 13, 2014 10:40:00 AM UTC-6, Mark Casey wrote: > > I have a role that uses the ec2 module and it is

[ansible-project] ec2 module works...ec2.py does not (confused!)

2014-01-13 Thread Mark Casey
I have a role that uses the ec2 module and it is working fine, so I'm assuming I'm ok on dependencies like boto... but when I try to run *ec2.py --list* I get back: root@ip-1-1-1-1:/etc/ansible/elastirax# ./ec2.py --list > Looks like AWS is down again: > EC2ResponseError: 401 Unauthorized > > A

[ansible-project] Re: Question about best practice approach to indicate that something is already "setup"

2014-01-13 Thread Mark Casey
I would worry that someone will delete /etc/java-version one day and blow everything up. Could you attempt to actually run something like *shell: "java --version"*and then register the output to a variable? You could then put a *when* on the java role that checks the contents of the output, pos

Re: [ansible-project] Can group_by add hosts to an existing group?

2014-01-08 Thread Mark Casey
en't already in >> the group just get added to the group?" >> >> More like: "the group is added to the host" based on the code >> >> >> On Wed, Jan 8, 2014 at 1:31 PM, Mark Casey >> > wrote: >> >>> If you use group_by bu

[ansible-project] Can group_by add hosts to an existing group?

2014-01-08 Thread Mark Casey
If you use group_by but the resulting group name already exists in your inventory, what happens? I'd assume the hosts that matched the group_by and weren't already in the group just get added to the group? If necessary I don't mind setting up a few VMs and testing it but I thought I'd see if an

Re: [ansible-project] Within a role... trying to use a group_by created in the previously run role

2014-01-08 Thread Mark Casey
ary 8, 2014 11:06:49 AM UTC-6, Mark Casey wrote: > > I didn't realize if you had a *../group_vars/Debian* file and ran the > task *group_by: key={{ansible_os_family}}* on a Debian family host that > in the next play those vars will be available. I just tried it though, and &g

Re: [ansible-project] Within a role... trying to use a group_by created in the previously run role

2014-01-08 Thread Mark Casey
hings a bit too complicated, I'd probably just > look into putting your hosts into a group and assigning the variables to a > group via group_vars and keeping it simple. > > But that's me. > > > > > On Tue, Jan 7, 2014 at 5:17 PM, Mark Casey > > wrot

Re: [ansible-project] Within a role... trying to use a group_by created in the previously run role

2014-01-07 Thread Mark Casey
UTC-6, Mark Casey wrote: > > Hi Michael, > > Thanks for your response. I think what I'm wanting to do sort of falls > through the cracks with regards to best practices...at least the way I'm > attempting it. > > I'm trying to do something like what this excerpt

Re: [ansible-project] Within a role... trying to use a group_by created in the previously run role

2014-01-07 Thread Mark Casey
ew hosts, or a per-distro list of files to remove setuid from) to different values for different hosts based on things like OS family or distro version.* Here is what I've got at the moment, which I've been tinkering at very intermittently over the last few months... it is the main.ym

Re: [ansible-project] Within a role... trying to use a group_by created in the previously run role

2014-01-06 Thread Mark Casey
All parts should go together without forcing. You must remember that > the parts you are reassembling were disassembled by you. Therefore, > if you can't get them together again, there must be a reason. By all > means, do not use a hammer." -- IBM maintenance manual, 1925 &g

[ansible-project] Within a role... trying to use a group_by created in the previously run role

2014-01-06 Thread Mark Casey
Hello everyone, My situation is that my playbook calls a role to split my hosts up using group_by. I then immediately call another role in which I want to use the newly created groups. The problem is that in the second role I cannot (to my knowledge) start new plays within ../role/task/main.ym