Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Local chroot support v2 #2106
Add support for acting on a local chroot. This could be used for building a preconfigured virtual OS image starting from a raw distro bootstrap.
Requires running ansible as
Includes two fixes for fails when
Example of use with a Debian boostrap:
Same as #2082 but now
Yeah, it is simpler than I was expecting.
I don't think lib should be a requirement, not all chroots will have that (consider e.g. /lib64).
Checking euid should probably be in the connection plugin instead of in bin/ansible or bin/ansible-playbook, as you can specify connection: chroot in the play and such. However, euid might not be enough as you can grant select capabilities (such as chroot) rather easily on recent Linux...
executable in the subprocess.Popen call will always None, as you explicitly ensure that is the case. You can even leave it off in this case.
Paths should be resolved with abspath inside of the chroot to follow symlinks correctly, otherwise you may start writing things outside of the chroot, and fail to make the files available as intended.
Not sure how to handle idempotence in such a module, maybe testing that
Now that you mention, I've started to pondering something like:
debootstrap makes things pretty easy, just saw your tweet.
Wonder if there is something similarly nice for CentOS/RHEL/Fedora
On Sat, Feb 23, 2013 at 6:48 PM, Maykel Moya email@example.com:
perhaps it should be called 'chroot' then and take something like a
On Sat, Feb 23, 2013 at 7:33 PM, Maykel Moya firstname.lastname@example.org: