[ansible-project] Re: Provisioning OpenStack with Ansible from scratch, missing modules?

2016-03-11 Thread Thiago Martins
On Saturday, March 12, 2016 at 3:40:42 AM UTC-3, Thiago Martins wrote: > > Hey guys, > > Currently, I'm developing an OpenStack Mitaka Ansible automation for > Ubuntu 16.04. > > I'm using a lot of "command / shell" Ansible modules and I would like to > avoid it, and start using native Ansible O

[ansible-project] Provisioning OpenStack with Ansible from scratch, missing modules?

2016-03-11 Thread Thiago Martins
Hey guys, Currently, I'm developing an OpenStack Mitaka Ansible automation for Ubuntu 16.04. I'm using a lot of "command / shell" Ansible modules and I would like to avoid it, and start using native Ansible OS modules. However, I can't find native modules for creating OpenStack Services, P

[ansible-project] Module "os_image" doesn't have "--location" option, any ideas?

2016-03-11 Thread Thiago Martins
Guys, Currently, I have a task that add a bunch of images on Glance, but using shell/command module, like this: --- - name: Adding a few Operating System images into Glance environment: "{{admin_openrc_env}}" command: "{{item}}" with_items: - glance image-create --location http://uec-i

[ansible-project] Re: Having trouble with running commands as pbrun escalation method

2016-03-11 Thread Akash Mondal
Hi Brian, Thanks for your response. In a normal scenario, I login using ldap user "someuser" and then become root using "pbrun sa -u root" power broker policy. I want to perform root specific tasks with ansible and my organization does not support sudo or su. At the moment I am a beginner with

Re: [ansible-project] How do you validate the Yaml file before Ansible it?

2016-03-11 Thread Robert Blankenship
I think that ansible-playbook --syntax-check is the correct command, not ansible-playbook --check-syntax On Friday, February 15, 2013 at 11:54:47 AM UTC-8, Michael DeHaan wrote: > > ansible-playbook has a --check-syntax option. > > In 1.1, it's a little smarter, and there is a --list-tasks t

[ansible-project] "sudo: a password is required" error in Ansible v2

2016-03-11 Thread Lakshmi Narasimhan Parthasarathy
Hi, I'm running an ansible 2 playbook against an EC2 inventory. It installs wordpress and apache on an EC2 instance. Here's the command I used: $ ansible-playbook -i ec2.py site.yml I get this error: PLAY [install apache, php, mysql server, wordpress] TASK [setu

[ansible-project] Deploy multiple copies of an application to a single host

2016-03-11 Thread Austin Little
Hey all, I'm coming from the Puppet world and learning (and loving!) more about Ansible. I'm curious how others would go about deploying a variable number of copies of an application to a given host? In the Puppet world, I've solved this by leveraging the create_resources() function with a dic

Re: [ansible-project] Ansible 2.0.0.2 main.yml fails with "ERROR! no action detected in task"

2016-03-11 Thread Matt Martz
Per that error you have an error in ensure_resolv_conf.yml: The error appears to have been in '/etc/ansible/roles/dns/tasks/ensure_resolv_conf.yml': line 2, column 3 You showed us you are doing an `include` on "ensure_resolv_conf.yml" but did not show us the contents of that file. We would need

Re: [ansible-project] all values from a YAML dictionary like structure

2016-03-11 Thread Matt Martz
You can use the `map` filter, and the `join` filter. "{{ node['test1']|map(attribute='id')|join(' ') }}" http://jinja.pocoo.org/docs/dev/templates/ On Fri, Mar 11, 2016 at 9:52 AM, Valerio Crini wrote: > Hi all, > I'd like to extract from a yaml complex dictionary as > > node: > host1:

[ansible-project] create a dir for user if its in group

2016-03-11 Thread Roy
Hi, I was trying following task, to create a user if user is a part on *hdfsuser* group - name: create user tmp dir /srv/tmp/$USER on gateway file: path=/srv/tmp/{{ item.name }} owner={{ item.name }} group={{ item.name }} mode=0755 state=directory when: "'hdfsuser' in {{ item.groups }}"

Re: [ansible-project] Execute commands remotely on a ubuntu

2016-03-11 Thread Karl E. Jorgensen
On Fri, Mar 11, 2016 at 05:25:26AM -0800, Vamberto Junior wrote: > Hi everyone, > > I am new user on ansible and I have a little difficulty to execute commands >  remotely on a Ubuntu Server. (Ubuntu don't accept ssh with user root and the > user vamberto can use sudo su - ) > My machine is a Fedo

[ansible-project] Ansible 2.0.0.2 main.yml fails with "ERROR! no action detected in task"

2016-03-11 Thread Daniel Osielczak
Hi, I'm setting up an Ansible 2 environemnt and stumbled upon a problem: when I run main.yml (either as a separate playbook or using the main site.yml) I get an error "ERROR! no action detected in task": [root@install-test7 ansible]# ansible-playbook roles/dns/tasks/main.yml -vvv Using /etc/ans

Re: [ansible-project] Having trouble with running commands as pbrun escalation method

2016-03-11 Thread Brian Coca
yes, there are a few people using pbrun, your command looks fine but w/o an error I'm not sure what 'not working' means. -- 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

Re: [ansible-project] support 'until' for blocks

2016-03-11 Thread Brian Coca
blocks do not support any type of loop On Fri, Mar 11, 2016 at 6:02 AM, Alexey Wasilyev wrote: > It there any way to run block in the do-until loop? Ansible 2.0.1.0 > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from

Re: [ansible-project] Alternative for "command: apt-get autoremove -y"?

2016-03-11 Thread Brian Coca
Like any option: - apt: autoremove=yes -- 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.

[ansible-project] Re: ec2 dict processing / volume provisioning

2016-03-11 Thread hllmt67
Well, after some more painful trial and error, and pissing Amazon off for sure, here's a working solution: I hope this saves someone some pain in the future. - name: data volumes ec2_vol: aws_access_key: "{{ key }}" aws_secret_key: "{{ secret }}" instanc

[ansible-project] all values from a YAML dictionary like structure

2016-03-11 Thread Valerio Crini
Hi all, I'd like to extract from a yaml complex dictionary as node: host1: - { id: '1' } - { id: '2' } all values for 'id' for 'host1' in order to convert this snipped of code from id_list: {{ xxx }} in id_list: '1' '2' in python I can do the followi

[ansible-project] Extract keys from a dictionary

2016-03-11 Thread Valerio Crini
Hi all, I tried to understand how extract from a structure as node: -- 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.

[ansible-project] Execute commands remotely on a ubuntu

2016-03-11 Thread Vamberto Junior
Hi everyone, I am new user on ansible and I have a little difficulty to execute commands remotely on a Ubuntu Server. (Ubuntu don't accept ssh with user root and the user vamberto can use sudo su - ) My machine is a Fedora Linux and I execute this command: ansible -vvv wolverine -m apt -a "upd

[ansible-project] ec2 dict processing / volume provisioning

2016-03-11 Thread hllmt67
Hi, I am having issues with passing ec2 instance provisioning results to other tasks in a playbook. I can launch instances, and then use " register: ec2 " to register a dictionary of the results. But I cannot seem to extract the instance id later. Using debug I can see i get valid results:

[ansible-project] Re: Create multiple VMware guests with a Playbook?

2016-03-11 Thread Mark Matthews
Hi Jon Thanks so much for the response. I was looking at that and have ried a few things without success. Are you able to see if im on the right track here? I have create a file called 'hostnames' which is located in a sub directory (files) where the playbook is, and have included the vm names

[ansible-project] support 'until' for blocks

2016-03-11 Thread Alexey Wasilyev
It there any way to run block in the do-until loop? Ansible 2.0.1.0 -- 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.c

[ansible-project] Re: Create multiple VMware guests with a Playbook?

2016-03-11 Thread 'J Hawkesworth' via Ansible Project
Hi Mark, I've not tried this myself with this specific module, but I think you should be able to use one of the with_ mechanisms in your playbook to create multiple vms. Have a look at http://docs.ansible.com/ansible/playbooks_loops.html#looping-over-hashes Hope this helps, Jon On Thursday,

Re: [ansible-project] Alternative for "command: apt-get autoremove -y"?

2016-03-11 Thread 'Benjamin Loehner' via Ansible Project
Thanks a lot, apt: autoremove is now available, but how do i use it? Am Donnerstag, 10. März 2016 15:49:46 UTC+1 schrieb Brian Coca: > > The apt module has been updated to allow this, it will be available in a > 2.1 release > > On Thu, Mar 10, 2016 at 6:33 AM, 'Benjamin Loehner' via Ansible Proje