Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lean-delivery/ansible-development-kit
Ansible Development Kit (roles development)
https://github.com/lean-delivery/ansible-development-kit
ansible ansible-roles cookiecutter development-kit molecule
Last synced: 4 months ago
JSON representation
Ansible Development Kit (roles development)
- Host: GitHub
- URL: https://github.com/lean-delivery/ansible-development-kit
- Owner: lean-delivery
- License: apache-2.0
- Created: 2018-08-20T20:38:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-02-01T14:11:08.000Z (about 4 years ago)
- Last Synced: 2024-09-30T17:42:16.443Z (4 months ago)
- Topics: ansible, ansible-roles, cookiecutter, development-kit, molecule
- Homepage: https://lean-delivery.com/ansible-development-kit
- Size: 127 KB
- Stars: 31
- Watchers: 17
- Forks: 15
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ansible-development-kit
=========
[![License](https://img.shields.io/badge/license-Apache-green.svg?style=flat)](https://raw.githubusercontent.com/lean-delivery/ansible-development-kit/master/LICENSE)
[![Build Status](https://travis-ci.org/lean-delivery/ansible-development-kit.svg?branch=master)](https://travis-ci.org/lean-delivery/ansible-development-kit)
[![Build Status](https://gitlab.com/lean-delivery/ansible-development-kit/badges/master/build.svg)](https://gitlab.com/lean-delivery/ansible-development-kit/pipelines)## How to use:
pip install cookiecutter
### Create a new role
- cookiecutter https://github.com/lean-delivery/ansible-development-kit
or
- molecule init template --url https://github.com/lean-delivery/ansible-development-kit
Enter for the role name question a value without the ansible-role- prefix, e.g. 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```
Useful commands:
- y - add this hunk to commit
- n - do not add this hunk to commit
- d - do not add this hunk or any of the later hunks in this file
- s - split the current hunk into smaller hunks
- e - manually edit the hunk
```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:
```yaml
---
default_context:
role_name: example
```To switch betweens Linux and Windows molecule tests add this variables to `.cookiecutter.yml`:
```yaml
---
default_context:
role_name: example
linux_tests: "true"
windows_tests: "false"
```To increase root volume size for Linux and Windows platforms in AWS add this variables to `.cookiecutter.yml`:
```yaml
---
default_context:
role_name: example
customize_vol_size_linux: "true"
volume_size_linux: 10
customize_vol_size_windows: "true"
volume_size_windows: 32
```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