Skip to content

deepdivenow/ansible-development-kit

 
 

Repository files navigation

ansible-development-kit

How to use:

pip install cookiecutter

Create a new role

or

Enter for the role name question a value without the ansible-role- prefix, e.g. example.

To be able to update the role with cookiecutter and run tests locally, rename created directory adding the ansible-role- prefix.

  • mv example ansible-role-example

Make changes in the corresponding files: copyright section in LICENSE, badge section in README.md (you can get galaxy's role id by running: ansible-galaxy info lean_delivery.example |grep '\bid'), etc.

Update an existing role

  1. cd ansible-role-example
  2. cookiecutter https://github.com/lean-delivery/ansible-development-kit --output-dir .. --overwrite-if-exists
  3. git status
  4. git add . -p
  5. git commit -m "Updated by cookiecutter and ansible-development-kit"

In order not to provide the same answers for cookecutter's questions it makes sense to put in the role's directory a config file .cookiecutter.yml like this:

---
default_context:
  role_name: ansible-role-example

and run cookiecutter the following way:

cookiecutter https://github.com/lean-delivery/ansible-development-kit --output-dir .. --overwrite-if-exists --config-file .cookiecutter.yml --no-input

About

Ansible Development Kit (roles development)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%