Re: [ansible-project] not able to match a string in a var list.

2016-03-29 Thread matthew . graham
Thanks Jean But the issue is that even when I changed them to underscore (like below), Im finding when I do the "'api' in deploy" it seems to not find it. Its only when Its a completely match in a line it works. ie when: "'api_author' in deploy". Example (this does not work) deploy: -

[ansible-project] not able to match a string in a var list.

2016-03-29 Thread matthew . graham
Hi All Doing something Im sure seems odd but building a production deployment script based on some very manual steps. The dev team list out all the services that need to be upgraded. I made a var called deploy to do two things. 1. Write out to a build file what needs to be build for prod. Its

[ansible-project] Re: Multiple test conditions for when: not working

2016-03-21 Thread matthew . graham
This seemed to fix my issue but not sure if this is the way I should do it... any feedback would be lovely when: - ('0 upgraded, 0 newly installed' not in apt_update.stdout) - ('0 to upgrade, 0 to newly install' not in apt_update.stdout) On Monday, 21 March 2016 16:52:38

[ansible-project] Re: use command output to trigger a new task

2016-03-21 Thread matthew . graham
Have you run it in debug to see what the kernalinstalled object looks like? - debug: var=kernalinstalled Also, I do believe the 2 needs to be like '2' as its actually a string not a integer thats returned. I think if you do something like kernalinstalled.stdout|int > 2 that may also work as

[ansible-project] Re: Multiple test conditions for when: not working

2016-03-21 Thread matthew . graham
I have also tried "( '0 to upgrade, 0 to newly install' not in ruby_installed_version.stdout) or ( '0 upgraded, 0 newly installed' not in ruby_installed_version.stdout)" maybe I missed something or there is a better way to test for this... :/ On Monday, 21 March 2016 16:52:38 UTC+11,

[ansible-project] Multiple test conditions for when: not working

2016-03-20 Thread matthew . graham
Hi All I was running an apt_update task and only wanted the server to reboot when it it saw neither of the two lines. Now, what is happening it only sees the first "test" I put in the when: section and ignores the second string to test. The reason for the two tests is I noticed that Debian and

[ansible-project] ec2_vpc_subnet_facts getting error accessing vpc_id from a fact

2016-01-16 Thread Matthew Graham
Hi All I'm very new to Ansible and loving it. Not sure if Im doing this right but having trouble getting the vpc_id from ec2_vpc_subnet_facts 1. My code runs the module - name: Get the VPC ID ec2_vpc_subnet_facts: region: "{{ aws_region }}" filters: subnet-id: