Full documentation(ansible-doc) is present inside the module.
Module | Description | Documentation |
---|---|---|
guestfs_command | Execute commands | doc |
guestfs_package | Manage packages | doc |
guestfs_user | Manage users | doc |
guestfs_copy_out | Fetch files | doc |
guestfs_copy_in | Upload files | doc |
Make sure everything is installed (mentioned in README Prerequisites) on the Ansible controller host.
All plays by default will run on localhost
unless overridden by hosts_pattern
variable.
Downloads CentOS image and executes df -h
.
ansible-playbook <PATH_TO_REPO>/samples/execute_commands.yml -i <PATH_TO_REPO>/samples/hosts
Downloads CentOS image and installs vim
.
ansible-playbook <PATH_TO_REPO>/samples/install_packages.yml -i <PATH_TO_REPO>/samples/hosts
Downloads CentOS image and modifies root user's password to changeme
.
ansible-playbook <PATH_TO_REPO>/samples/modify_users.yml -i <PATH_TO_REPO>/samples/hosts
Downloads CentOS image and copies /etc/hosts
from the image.
ansible-playbook <PATH_TO_REPO>/samples/copy_out.yml -i <PATH_TO_REPO>/samples/hosts
Downloads CentOS image and copies /etc/hosts
from host to the image.
ansible-playbook <PATH_TO_REPO>/samples/copy_in.yml -i <PATH_TO_REPO>/samples/hosts