Skip to content

wahlax/cloud-init-ansible-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example Cloud-Init for Ansible

Example config for cloud-init to execute ansible playbook for provisioning.

Provisioning Prep

  • Added packages - git, python3, python3-pip
  • Added user - ansible
  • Provisioned user with sudo
  • Installed ansible for user

Provisioning

  • Clone git repo with ansible provisioning
  • Install requirements for playbook using galaxy
  • Execute playbook against localhost

Testing

Credit: Tested with vagrant image from @geerlingguy's Ansible for Devops

Multi-step Test Process

vagrant up
vagrant halt
. cloud-init-env.shl
vagrant up

Testing with vagrant requires multipe steps:

  • installing cloud-init on vm
  • stopping vm
  • enable vagrant's experimental cloud-init features
  • restart vm to provision with cloud-init

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published