[ansible-project] Re: Pass vault variables into large config vault file.

2015-12-21 Thread Alexey Vazhnov
No, I suggest to use big unencrypted template with no private data and crypted variables in vault storage. Usually in big configuration file not all data need to be secured, only some variables. On Friday, December 18, 2015 at 10:14:49 PM UTC+5, Colin Byrne wrote: > > But can you encrypt the tem

Re: [ansible-project] variable for server as entered in inventory

2015-12-21 Thread Brian Coca
inventory_hostname has the name of the current host, so : - hosts: servers tasks: - debug: var=inventory_hostname should do what you want. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this grou

Re: [ansible-project] Issue with local_action

2015-12-21 Thread Brian Coca
You should not need to set become/sudo to false (also they are redundant) unless you are setting it elsewhere to do so. If set through the command line, ansible.cfg or environment variables. If you set the inventory vars 'ansible_become/ansible_sudo', these would override the directives, to avoid

[ansible-project] variable for server as entered in inventory

2015-12-21 Thread Ed Greenberg
I have an inventory that contains (for example): [servers] 1.2.3.4 1.2.3.5 1.2.3.6 server1.foo.bar server2.foo.bar I'd like to access the entry under servers as a {{ variable }} in a playbook, for each of the entries that are processed. I've read the pages on ansible variables, but didn't find

[ansible-project] Issue with local_action

2015-12-21 Thread Joe Talerico
Executing a local_action, and i expect it to execute as the user running the playbook, however it attempts to sudo - hosts: all gather_facts: False become: false sudo: false name: Generating bug report tasks: - local_action: template src=templates/bug_report.j2 dest=./bug_repor

[ansible-project] Ansible 2.0 RC3 is available for testing!

2015-12-21 Thread James Cammarata
Hi all, sorry for the delay, but we're happy to announce the third release candidate for Ansible 2.0! This release candidate includes some last minute bug fixes and cleanups since the last release candidate. As noted in our previous update, we are targeting the final 2.0 release for January 6th.

Re: [ansible-project] playbook executes but hangs when executing remote python script

2015-12-21 Thread Matt Martz
What are you trying to achieve? Ansible waits until the script exits before moving on. Your python script appears that it will never exit. I think what you are looking for is "fire and forget" functionality? If so, you can achieve that by using async and poll. A poll value of 0 will allow the

[ansible-project] Re: ec2_ami creating a new AMI from EBS volume snapshot

2015-12-21 Thread christopherlove68
Following up on my own question, it looks like Ansible PR #2029 will add this support. On Saturday, December 19, 2015 at 7:57:07 PM UTC-8, christop...@gmail.com wrote: > > Hi all, > > I have an existing manual process for creating an A

[ansible-project] playbook executes but hangs when executing remote python script

2015-12-21 Thread richard kappler
I need to stop and then start a python script on numerous remote servers. I set up a vm in our test environment to walk through this. The 'remote server' has a simple python script (test.py) in /test directory: #!/usr/bin/env python while True: print "running\n" my playbook has a hosts

Re: [ansible-project] Ansible newbie, reporting misleading documentation on roles

2015-12-21 Thread Brian Coca
I hope this is clearer http://github.com/ansible/ansible/commit/593d80c63d408012550850eb06d85387588cee3b -- 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

[ansible-project] Ansible newbie, reporting misleading documentation on roles

2015-12-21 Thread Spencer Brown
In the ansible docs for Playbook Roles and Include Statements , it says that once you set up a role x and reference it in a playbook: >- Any copy tasks can reference files in roles/x/files/ without having >to path them relatively or

Re: [ansible-project] Ansible newbie

2015-12-21 Thread Matt Martz
I think what you are wanting is something like: *ansible all -i hosts -m shell -a '/u01/app/em/core/12.1.0.5.0/root.sh' -k --sudo --ask-sudo* The change there is to switch from `@hosts` to `all -i hosts`. `all` specifies to connect to all hosts in the hosts file, and `-i hosts` specifies the host

[ansible-project] Ansible newbie

2015-12-21 Thread Yvonne Butler
Hi, I'm new to using ansible and want to run a command on a number of servers which I have listed within a text file. I've tried the command below where "hosts" is the file containing the server name list but no luck, any ideas how I can achieve this? *ansible @hosts -m shell -a '/u01/app/em/

Re: [ansible-project] [ansible-2.0.0-0.7.rc2] os_server_facts module - Syntax Error while loading YAML

2015-12-21 Thread Stavros
There is actually no more (for now) than these 4 lines: http://pastebin.com/download/uzxvCB9k -- 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-projec

[ansible-project] Test Kitchen with Ansible and Serverspev

2015-12-21 Thread Neill Turner
Thought there might be interested in what i've built with test-kitchen to automatically build multiple servers with multiple roles and use serverspec to test them. You can see it https://github.com/neillturner/ansible_repo here https://github.com/neillturner/busser-ansiblespec and

Re: [ansible-project] [ansible-2.0.0-0.7.rc2] os_server_facts module - Syntax Error while loading YAML

2015-12-21 Thread Jakub x
Can You post a whole playbook? Put it on pastebin or sth. W dniu poniedziałek, 21 grudnia 2015 10:06:25 UTC+1 użytkownik Stavros napisał: > > I checked that with the YAML Lint and after adding/removing a couple of > spaces... > > - os_server_facts: > server: W1 > - debug: > var

[ansible-project] Re: ansible and pyhton

2015-12-21 Thread Anthony salvado
i want find the number on the variable ansible_hostname : for instance : dev1-client --> i want 1 dev2-client --> i want 2 prod12-client --> i want 12 -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

[ansible-project] ansible and pyhton

2015-12-21 Thread Anthony salvado
hi all, i want use this on ansible variable : *import re * *number1 = re.findall("\d+", ansible_hostname)* *i've try this : number1: "{{ re.findall* *('\d+', ansible_hostname) }}"but it's not ok ^^ have you idea ? * -- You received this message because you are subscribed to the Google G

Re: [ansible-project] [ansible-2.0.0-0.7.rc2] os_server_facts module - Syntax Error while loading YAML

2015-12-21 Thread Stavros
I checked that with the YAML Lint and after adding/removing a couple of spaces... - os_server_facts: server: W1 - debug: var: openstack_servers ...it doesn't return a YAML syntax error, but: admin:~/temp > ansible-playbook -i oshost os_server_facts.yml - Using /home/admin/.ansib