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

2016-10-24 Thread Sonny Chee
Hey Guys, 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... ie: shell: . ~/.bash_aliases && my_command args Any help would be appreciated. -- You received this message because you are subscribed to the Google

[ansible-project] Re: Cumulative group variables?

2016-10-24 Thread Mike Biancaniello
So, the problem is that you can't combine lists, but you can merge dicts (it's a config setting, default=false). This will require either a double for loop or, (my preference, especially if you are going to use this type of construct a lot) a filter to combine them. # file: /group_vars/tors

[ansible-project] Re: Not able to load the credentials

2016-10-24 Thread Alexander H. Laughlin
Hello, I believe something like the below would solve your problem: --- - hosts: localhost connection: local vars: subscription_id: XX Client_id: xxx Serect_key: XX Tenent_id:

[ansible-project] Re: auto package version selection?

2016-10-24 Thread Alexander H. Laughlin
Assuming you know ahead of time or have a way of finding out during playbook execution which version is installed I don't see why it wouldn't be possible. You could create a couple of yaml dictionaries for the purpose and iterate over whichever one is appropriate using a when statement. On

[ansible-project] ansible ad-hoc commands using vault

2016-10-24 Thread AC
Hello, I'm having an issue with ansible vault and my aws-private.pem ssh key. I can't seem to figure out the correct commands to use. I have an encrypted .yml file called '/etc/ansible/vars/main.yml'. This file was encrypted using ansible vault. In this file I have: # --- dependencies: []

[ansible-project] Re: Cumulative group variables?

2016-10-24 Thread Cody John
On Monday, October 24, 2016 at 12:22:53 PM UTC-7, Cody John wrote: > > I'm working on modeling our datacenter top-of-rack switches in Ansible, > and have run into a potential problem with my approach. The basic idea is > to use a hierarchal group structure that starts with general purpose

Re: [ansible-project] vyos_command module says that paramiko is not installed.

2016-10-24 Thread Barney Sowood
Hi, On Mon, 24 Oct 2016, at 03:31 PM, Lukas Nagy wrote: > I am trying to use VyOS module, included in Ansible 2.2. When I am > trying to run simple playbook to set DHCP server, it fails on missing > paramiko module. I've tried pip install paramiko but it is already > installed. Reinstallation

[ansible-project] auto package version selection?

2016-10-24 Thread david
Hi, I'm deploying an application via Ansible on Ubuntu. The application's .deb requires several php modules but misses some so in my playbook I have the following. - name: Install php packages apt: name={{item}} state=installed with_items: - php5-gd - php5-imagick -

[ansible-project] Not able to load the credentials

2016-10-24 Thread 'Girish Kumar Mayigowda' via Ansible Project
Hi, I am trying to create a storage account and below is the play book and the error, please let me know what am missing. i have created a file credentials.ini under etc/home/.azure --- - hosts: localhost connection: local vars: subscription_id:XX

[ansible-project] vyos_command module says that paramiko is not installed.

2016-10-24 Thread Lukas Nagy
Hello. I am trying to use VyOS module, included in Ansible 2.2. When I am trying to run simple playbook to set DHCP server, it fails on missing paramiko module. I've tried pip install paramiko but it is already installed. Reinstallation doesn't helped too. What should I do or what am I doing

[ansible-project] Re: Ansible plugin for FreeIPA

2016-10-24 Thread Thomas Krahn
> > Hi All, > i'm happy to announce that i've open a PR for ansible-modules-extras. https://github.com/ansible/ansible-modules-extras/pull/3247 Feel free to test it and provide feedback. If things are good, the modules would be in Ansible 2.3. Thomas -- You received this message because

Re: [ansible-project] inventory not being able to read when using ansible 2 api

2016-10-24 Thread Oğuz Yarımtepe
I realized that i haven't set the ansible.cfg file path. My cli app is at another path and although i set the inventory variable there, nothing changed. Still not able to connect to the remote host. It is somehow not able to connect, not able to understand the user and password vars defined at the

[ansible-project] Unable to pass the value for a variable in included playbook via another variable in the calling playbook

2016-10-24 Thread ishan jain
I have a playbook which requires to perform some actions for each string in a comma separated list. So i put the repeatable tasks in another playbook and included that in a master playbook using with_items: - include:included.yaml module="{{item}}" with_items:

[ansible-project] Exec command before/during/after "expect"

2016-10-24 Thread Benjamin Redling
Hi everybody, I'm trying to script around an ugly installer that expects to run from a DVD. I copied the DVDs and mounted them as loop device. The problem I face is that after the first DVD finished and it outputs a line beginning with "Insert DVD 2..." (A software that typically gets installed

Re: [ansible-project] inventory not being able to read when using ansible 2 api

2016-10-24 Thread Oğuz Yarımtepe
Here is the self variables. They are read from a settings.yml and are set during execution self.data = data self.host = data['host'] self.hostname = data['hostname'] self.conn_name = data['conn_name'] if ipam.ip: self.guest_ip4_address = ipam.restart_ip else: self.guest_ip4_address =

[ansible-project] Re: When more than one play in a playbook, how to define an order for running one before others

2016-10-24 Thread 'J Hawkesworth' via Ansible Project
Not sure I really understand but you can maybe use pre_task before to set_fact. And you can use multiple when: conditions if you need to. Another way to solve this might be to use role dependencies: http://docs.ansible.com/ansible/playbooks_roles.html#role-dependencies That way you could

Re: [ansible-project] inventory not being able to read when using ansible 2 api

2016-10-24 Thread Brian Coca
You don't show how/where you define `self.hostname_hosts`. -- 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] inventory not being able to read when using ansible 2 api

2016-10-24 Thread Oğuz Yarımtepe
Here is my structure. ✗ tree -L 2 . ├── ansible.cfg ├── ansible.cfg.bak ├── group_vars │ ├── default │ └── default.bak ├── hosts ├── playbook.yml ├── playbook_hostname.yml ├── playbook_ip.yml ├── roles │ ├── hostname │ ├── ip │ └── satellite When i run the below code, i am not able to

Re: [ansible-project] Re: Want to run ansible tasks on remote host

2016-10-24 Thread deepak dimri
Thanks Brian, delegate_to: did work for me On Sat, Oct 22, 2016 at 4:57 AM, Brian Coca wrote: > You want `delegate_to: host3`, docs at http://docs.ansible.com/ > ansible/playbooks_delegation.html#delegation > > > -- > Brian Coca > > -- > You received this message

Re: [ansible-project] How can i include other var files in a yaml file with only variables defined

2016-10-24 Thread Brian Coca
You cannot, YAML does not have an include feature. -- 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] Re: When more than one play in a playbook, how to define an order for running one before others

2016-10-24 Thread fanvalt
Thank you but I already use a when condition on the role. But it won't make the 1st play with the 1st role being run first Le lundi 24 octobre 2016 15:06:35 UTC+2, J Hawkesworth a écrit : > > You can use a when: conditional against your role (if you don't mind > seeing lots of 'skipped' steps

[ansible-project] Re: When more than one play in a playbook, how to define an order for running one before others

2016-10-24 Thread 'J Hawkesworth' via Ansible Project
You can use a when: conditional against your role (if you don't mind seeing lots of 'skipped' steps for each task in the role. see http://docs.ansible.com/ansible/playbooks_conditionals.html#applying-when-to-roles-and-includes Jon On Monday, October 24, 2016 at 11:26:33 AM UTC+1, fanvalt

[ansible-project] How can i include other var files in a yaml file with only variables defined

2016-10-24 Thread ishan jain
Hi, I use simple YAML files for defining some constant values to be used in my playbooks. A typical file would look like this: var1: abc var2: xyz var3: - item1 - item2 var4: 4.1: a 4.2: b I simply include the the file(s) like above in my playbooks in vars: section and all the