Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.
/ vagrant-ansible Public archive

Nothing to see here. Just a vagrant configuration for ansible provisioning.

Notifications You must be signed in to change notification settings

ryankanno/vagrant-ansible

Repository files navigation

Vagrant-Ansible

Nothing to see here. This is just my vagrant configuration setup to test my ansible playbooks.

Getting started

You'll need to install:

To test out my ansible playbooks, you'll want to perform the following:

  • Create a configuration file named .vagrant-ansible-cfg (example)

    • ROLES_ENABLED - Should point to the project path <project_root>/provisioning/roles.
    • ROLES_AVAILABLE - Should point to the path where your playbooks are installed.
  • Run ./enrole.sh <ROLE> to enable a role (defaults to -h with no <ROLE>)

  • Create a playbook.yml file in provisioning directory (example)

  • Make sure to add the role to the playbook.yml

Once you've enabled a role, run the following:

  • vagrant up
  • vagrant provision

After you're done testing:

  • Run ./disrole.sh <ROLE> to disable a role (defaults to -h with no <ROLE>)

Note:

  • Run ./disrole.sh all to disable all roles (defaults to no, may change that option later since it's explicit)

Voila. Happy VM'ing.

Example: Testing out the apt playbook

To test the apt playbook, you'll want to perform the following:

  • Ensure you have a configuration file named .vagrant-ansible-cfg
  • ./enrole.sh apt
  • Add the apt role to your playbook.yml file

Note

  • Don't use this structure for a production setup; follow Ansible best practices
  • VM is setup on a host only network @ 88.88.88.88

About

Nothing to see here. Just a vagrant configuration for ansible provisioning.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages