[ansible-project] Re: Questions about roles_path

2016-10-18 Thread candlerb
I think I found a workaround. ansible looks for ansible.cfg in the current working directory, before looking in ~/.ansible.cfg or /etc/ansible.cfg So I can include within the playbook directory: [defaults] inventory = ./hosts roles_path = ../shared/roles This works as long as the user does: c

[ansible-project] Questions about roles_path

2016-10-17 Thread candlerb
A couple of questions: (1) Is it possible to set roles_path within a playbook? (I tried "vars: {roles_path: ...}" and "vars: {ansible_roles_path: ...}" but they didn't work) (2) Is it possible to set roles_path to search for directories relative to playbook_dir ? Here's the use case. I want t

Re: [ansible-project] Anybody working on ansible modules for lxd?

2016-05-17 Thread candlerb
So it should already be usable in ansible 2.2.0 devel? Super. Yep, just tested it. Thank you!! -- 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

Re: [ansible-project] Anybody working on ansible modules for lxd?

2016-05-15 Thread candlerb
I don't have time to actually test it today. Looking at the code/features: this looks like a good starting point. It is missing the ability to create or update a profile (idempotently) which is something I'll need. A separate desirable feature would be "ansible_connection=lxd", using: https://g

[ansible-project] Anybody working on ansible modules for lxd?

2016-05-15 Thread candlerb
lxd is the new container system which is included by default in ubuntu 16.04: https://linuxcontainers.org/lxd/ Unlike docker, lxd containers are essentially lightweight VMs, with their own init daemon, sshd etc, and typically on a static IP address. I'd like an ansible to: (1) Handle lifecycle

Re: [ansible-project] ssh to FreeBSD is hanging

2015-09-14 Thread candlerb
Now I think about it, I may never have gotten to the bottom of this, and just gave up using password authentication with FreeBSD. If you can replicate it like this: echo "xyzzy" >ert sshpass -f ert ssh -vvv brian@bsdtest echo hi then that shows that it's an sshpass problem, rather than an ansi

Re: [ansible-project] ssh to FreeBSD is hanging

2015-09-14 Thread candlerb
I was rarely able to get anything useful with `-`, especially if the far end gave some unexpected prompt or there was some problem with sshpass, because the stdout/stderr is lost. Try following the debugging process I outlined earlier: * assemble the full ssh command line from the ['pieces',

Re: [ansible-project] Re: 'tuple' object has no attribute 'iteritems'

2015-08-07 Thread candlerb
Is that a development version? I've done a "git pull" and the latest *tagged* version is v1.9.2-1, although there is a *branch* called v2_final If I checkout the latest git devel branch, I see the same as you. I suggest you raise it directly on github. The following standalone playbook reproduc

[ansible-project] Re: 'tuple' object has no attribute 'iteritems'

2015-08-06 Thread candlerb
Which version of ansible? As a standalone test case, it works for me with ansible-1.7.1. brian@wrn-mon1:~$ cat test.yml - hosts: localhost tasks: - name: run syslog-ng version command: syslog-ng --version register: ver_out changed_when: false - name: set ver set

[ansible-project] Re: Role to encapsulate several OS specific "sub-roles"

2013-12-16 Thread candlerb
You can include tasks conditionally within a role: [roles/apache/tasks/main.yml] - include: debian.yml when: ansible_os_family == 'Debian' - include: redhat.yml when: ansible_os_family == 'RedHat' # Now do stuff which is both common to Debian and RedHat As well as doing OS-specific tasks in

Re: [ansible-project] Monitoring long-running tasks

2013-12-04 Thread candlerb
On Wednesday, 4 December 2013 15:19:12 UTC, Michael DeHaan wrote: > > There is already an open RFE for intermediate status, look through the > queue under feature ideas and you should find it > > OK, I think it's this one - specifically for stderr to be available. https://github.com/ansible/ansib

[ansible-project] Monitoring long-running tasks

2013-12-04 Thread candlerb
Just throwing this out for ideas - it may yet turn into a feature request ticket. I plan to use the Ansible API to manage some infrastructure, but some of the tasks will take several hours to complete: in particular, copying 1TB+ files from an NFS mount to local disk. ("shell: cp /nfs/foo /loca

[ansible-project] Testing the ansible version

2013-11-26 Thread candlerb
Now that ansible 1.4.0 is out, I'd like to start making use of some of the new modules. But I'd like to make sure there are no surprises for people using my playbooks. So is there a way inside a playbook either to check the version of ansible it is running under, or assert a minimum required ve