Re: [ansible-project] Multiple users running ansible on the same host causes blocking

2017-02-28 Thread Andrew Martin
Brian, Thanks, these are good ideas: Are you using a common user? > no, separate users > do you have custom callbacks or facts cache setup to a absolute path? > yes, but the custom callback path is relative > are your contol persist settings relative or absolute? absolute; I have changed this

[ansible-project] Multiple users running ansible on the same host causes blocking

2017-02-27 Thread Andrew Martin
I am running Ansible 2.2.0 on Ubuntu 16.04. When I have more than one user running a playbook on hosts all from this same server, I sometimes observe this behavior: -user 1 starts running a playbook on host A, playbook is running along fine -user 2 starts running a playbook on host B, p

Re: [ansible-project] Ansible reads all files in host_vars and group_vars instead of just the ones for the specified hosts

2016-05-17 Thread Andrew Martin
, that isn't targeted by the play, which is > often done. > > On Tue, May 17, 2016 at 4:11 PM, Andrew Martin > wrote: > >> Hello, >> >> I am running ansible 2.0.2 on Ubuntu 14.04. I have several vaulted >> host-specific or group-specific files in host_vars or

[ansible-project] Ansible reads all files in host_vars and group_vars instead of just the ones for the specified hosts

2016-05-17 Thread Andrew Martin
Hello, I am running ansible 2.0.2 on Ubuntu 14.04. I have several vaulted host-specific or group-specific files in host_vars or group_vars, so whenever I run "ansible-playbook", I pass the "--ask-vault" option. I noticed some odd behavior - if I run with "--ask-vault" and strace the "ansible-p

[ansible-project] Using "when" with dependent roles

2016-02-01 Thread Andrew Martin
Hello, I recently upgraded to Ansible 2.0 and have noticed a change in behavior with how dependent roles in meta/main.yml are executed. For example: dependencies: - { role: role1, when: trigger } - { role: role2, when: not trigger } In Ansible 1.9, I could set trigger == True or trigger == Fal

[ansible-project] Whitespace in multi-line variables on ansible 2.x

2016-01-19 Thread Andrew Martin
Hello, When creating multi-line variables, I would often use the following technique to insert tabs in ansible 1.x: myvar: | {{'\t'}}one {{'\t'}}two {{'\t'}}three This would result in the 3 lines being indented by a tab character in the resulting file. However this does not seem to work i

[ansible-project] defaults vs vars precedence in dependent roles

2015-08-04 Thread Andrew Martin
ault value in a meta role. I prefer overriding the variables in vars/main.yml rather than needing to override them in meta/main.yml because that can become a long, messy list. Has variable precedence behavior changed recently, or can anyone explain why this has stopped working? Thanks, Andre

Re: [ansible-project] How to propagate changes to previously-applied tasks (e.g removing files, changing crons, etc)

2015-07-20 Thread Andrew Martin
Brian, Thanks for the clarification. Andrew On 15 July 2015 at 13:34, Brian Coca wrote: > not really, since you could have 10 diff plays for adding cron, > ansible won't know about the other 9 when running 1, it is up to you > too keep track. I just normally create 1 off plays and put them in

[ansible-project] How to propagate changes to previously-applied tasks (e.g removing files, changing crons, etc)

2015-07-15 Thread Andrew Martin
Hello, I have really enjoyed using Ansible to be able to completely template new servers that I set up, but one thing I have not yet figured out how to do in my workflow is deal with changes that occur after a playbook has been run on a server. For example, let's say that I have a cron task tha

[ansible-project] Keyword in playbook to include vault

2014-12-23 Thread Andrew Martin
Is there a way to have a playbook for a particular server know to prompt for a vault password automatically, rather than needing to pass --ask-vault-pass on the command line? I only store encrypted information in a vault for some of my servers, so I do only need to use --ask-vault-pass on some

Re: [ansible-project] allow_duplicates does not appear to be working in my use case

2014-08-19 Thread Andrew Martin
save us time and we'd >>> appreciate the updated report. >>> >>> Thanks! >>> >>> >>> >>> >>> On Tue, Aug 12, 2014 at 1:09 PM, Andrew Martin >>> wrote: >>> >>>> Hello, >>>>

Re: [ansible-project] allow_duplicates does not appear to be working in my use case

2014-08-18 Thread Andrew Martin
gt; > The current released version of Ansible is 1.7.0, have you checked on the > latest? > > Not saying this is not a thing, but would save us time and we'd appreciate > the updated report. > > Thanks! > > > > > On Tue, Aug 12, 2014 at 1:09 PM, A

[ansible-project] allow_duplicates does not appear to be working in my use case

2014-08-12 Thread Andrew Martin
Hello, See https://github.com/ansible/ansible/issues/8559 for additional details, but in brief I have 3 roles: roles/apache2/meta/main.yml: > --- > allow_duplicates: yes roles/apache2-php/meta/main.yml: > --- > allow_duplicates: yes > dependencies: > - { role: apache2 } roles/apache2-ssl

[ansible-project] Grant PROXY to MySQL User

2014-02-07 Thread Andrew Martin
Hello, I am working on a playbook to create a new MySQL user and grant it specific privileges. This task works successfully: - name: Create new database user mysql_user: login_user={{ mysql_root_user }} login_password={{ mysql_root_pass }} name=myuser password={{ user_password }} priv=*.*

Re: [ansible-project] Creating a network with libvirt

2014-01-15 Thread Andrew Martin
o facetweet to instatube. > > I'd welcome additions however, though I'd question if maybe it needs to be > in a 'libvirt_network' module to keep the arguments from intermixing. > > > > > On Wed, Jan 15, 2014 at 1:05 PM, Andrew Martin > wrote: > >

[ansible-project] Creating a network with libvirt

2014-01-15 Thread Andrew Martin
Hello, As part of a playbook I'm writing for creating a KVM virtualization server, I'd also like to create a new virtual network for VMs to use. The commands I would normally run to do this are: virsh net-define /path/to/mynetwork-config.xml virsh net-autostart mynetwork virsh net-start mynetwor

Re: [ansible-project] Blacklist specific hosts or groups in a role or playbook?

2013-12-06 Thread Andrew Martin
u can't get them together again, there must be a reason. By all > means, do not use a hammer." -- IBM maintenance manual, 1925 > > > > On 7 December 2013 07:12, Serge van Ginderachter > > wrote: > > > > On 6 December 2013 20:56, Andrew Martin > > wrot

Re: [ansible-project] Blacklist specific hosts or groups in a role or playbook?

2013-12-06 Thread Andrew Martin
n Ginderachter wrote: > > > On 6 December 2013 20:40, Andrew Martin > > wrote: > >> Thanks for the information. In order to exclude a hostname called >> "mailserver", would I simply add a hosts line like this to the top of the >> postfix role's

Re: [ansible-project] Blacklist specific hosts or groups in a role or playbook?

2013-12-06 Thread Andrew Martin
Serge, Thanks for the information. In order to exclude a hostname called "mailserver", would I simply add a hosts line like this to the top of the postfix role's tasks/main.yml? - hosts:!mailserver - name: task1 ... - name: task2 ... Will this override the list of hosts that I provide

[ansible-project] Blacklist specific hosts or groups in a role or playbook?

2013-12-06 Thread Andrew Martin
Hello, Is it possible to prevent a playbook, role, or even specific task from being run on a certain list of hostnames (or group)? I have a generic playbook for configuring postfix for sending emails, however I don't want this playbook to ever be run against a mail server (which has a different