Setup a machine to develop Ansible roles, including all the easy to work with tools, ansible, ansible-lint, molecule, travis and ara.
Go to file
Robert de Bock 907d1e2b97 Add nfsserver. 2020-10-27 11:00:07 +01:00
files Initial commit. 2019-01-03 11:17:38 +00:00
inventory Add nfsserver. 2020-10-27 11:00:07 +01:00
roles Fix for: role name invalid format: robertdebock.investigate 2020-09-28 15:24:21 +02:00
.gitignore Include roles for the collection. 2019-06-11 21:07:09 +02:00
.travis.yml Switch to ansible-galaxy instead of mazer, thanks @molekuul! 2020-07-22 20:02:00 +02:00
README.md Also no mazer in README.md 2020-07-22 20:15:30 +02:00
Vagrantfile Update roles, change names. 2020-09-28 11:54:36 +02:00
Vagrantfile.libvirt Use different way to call roles. 2019-06-12 07:34:22 +02:00
Vagrantfile.virtualbox Add forensics. 2019-12-12 16:09:21 +01:00
ansible.cfg Update roles, change names. 2020-09-28 11:54:36 +02:00
galaxy.yml Add nfsserver. 2020-10-27 11:00:07 +01:00
playbook.yml Update roles, change names. 2020-09-28 11:54:36 +02:00

README.md

Ansible development environment

Setup a machine to write Ansible roles. Includes:

Download

ansible-galaxy collection install robertdebock.development_environment

Requirements

  • One machine
  • About 4GB or RAM will do.
  • 2 CPUs, 1 will also do.
  • Personalized inventory/group_vars/all.yml.

Mac / Linux

Vagrant requires a different file for Virtualbox (typically Mac OS X) and libvirt (typically Linux).

For Virtualbox / Mac OS X:

rm Vagrantfile
ln -s Vagrantfile.virtualbox Vagrantfile

For libvirt / Linux:

rm Vagrantfile
ln -s Vagrantfile.libvirt Vagrantfile

Now change a few files:

  • files/gitconfig should contain your details.
  • files/id_rsa should contain an ssh-key used to commit to GitHub.
  • inventory/hosts should contain your machine.
  • inventory/group_vars/all.yml should contain your details.

Install

Simply run ./playbook.yml. Preparing your system will take about 15 minutes or so.

Code

You are now ready to code! Have fun using these commands:

# See if your code meets all rules.
ansible-lint .
# Test all scenarios.
molecule test
# Test a specific scenario.
molecule test --scenario-name fedora-latest

You can see the playbook runs on https://localhost:9191/