Commit Graph

6 Commits (7b13b1e03e4f312d0fb3c77a18ea761749428b9e)

Author SHA1 Message Date
Maykel Moya 60f24bb077 Remove unused modules 2013-05-18 23:11:47 +02:00
Maykel Moya f52e3dee70 Don't hardcode chroot executable path 2013-05-18 23:09:38 +02:00
Michael DeHaan 9073aa17ab Chroot also needs args/kwargs. 2013-04-05 14:50:15 -04:00
Maykel Moya e898f30f78 Fix copyright 2013-03-06 02:40:34 +01:00
Michael DeHaan f7fb681bb2 Fix comment in chroot connection type 2013-02-23 11:56:24 -05:00
Maykel Moya 9a493ef388 Add support for running modules chrooted in a local dir
Adds 'chroot' connection for executing modules chrooted to
a local dir. Requires running ansible as root.

chroot dirs should be specified in the inventory like any
other host.

You can do things like:

$ sudo -E ansible -vvv -f 1 "./chroot1,./chroot2" -c chroot \
  all -m setup
$ sudo -E ansible-playbook -vvv -f 1 -i "./chroot1,./chroot2" \
  -c chroot some-playbook.yml

some-playbook.yml:
---
- hosts: all
  tasks:
    - name: echo something
      shell: echo "Yaaay!" >/tmp/foobar.txt
    - name: install less
      apt: pkg=less state=latest
2013-02-21 00:51:02 +01:00