A collection of scripts to be used in conjunction with ansible-skeleton and ansible-role-skeleton.
-
Eiter download the source and extract it somewhere, or clone the repository
git clone https://github.com/bertvv/ansible-toolbox.git -
Run the installation script:
./install.sh <install-dir>
The installer will copy all scripts into the specified directory. If you omit the directory, it will copy the scripts into /usr/local/bin when invoked by the superuser, or into ~/.local/bin when run by a normal user. The installation directory must exist.
atb-export-vm: export a VirtualBox VM to an .ova file, removing the shared folder created by Vagrant.atb-get-facts: list all facts (ansible_*variables) from a Vagrant box.atb-init: set up scaffolding code for a Vagrant+Ansible development environment based on https://github.com/bertvv/ansible-skeleton/.atb-init-role: set up scaffolding code for an Ansible role based on https://github.com/bertvv/ansible-role-skeleton/.atb-list-variables: search the current directory (assumed to contain the code for an Ansible role) for role variables, and prints an alphabetical list. The list can also be formatted as a Markdown table, useful for role documentation.atb-provision: Runansible-playbookon a host managed by Vagrant. The benefit of this (compared tovagrant provision) is that you can limit execution to specific hosts (--limit=<hosts>) or tags (--tags=<tags>), or that you can pass arbitrary options toansible-playbook.atb-role-deps.sh: Installs all roles mentioned inansible/site.ymlfrom Ansible Galaxy or Github.
Remark that none of the scripts require superuser privileges. Call any of the scripts with option -h or --help for specific documentation.
Issues, feature requests, ideas are appreciated and can be posted in the Issues section. Pull requests are also very welcome. Preferably, create a topic branch and when submitting, squash your commits into one (with a descriptive message).
BSD
Bert Van Vreckem (bert.vanvreckem@gmail.com)