Yeoman generator for creating Ansible plays
MIT License
This Yeoman generator will create a new Ansible playbook and associated
make
commands to run and edit it.
First, install Yeoman and generator-ansible-play using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-ansible-play
Then generate your new project:
yo ansible-play
.
├── .gitignore
├── handlers
│ └── main.yml
├── LICENSE
├── Makefile
├── playbook.yml
├── README.md
├── requirements.yml
├── tasks
│ └── main.yml
├── templates
└── vars
└── vars.yml
4 directories, 9 files
make
commandsmake editvars
: will edit the encrypted variables file at vars/enc_vars.yml
and prompt for the password if .vault_pass
is missing. The password will be written to .vault_pass
to avoid prompting again. .vault_pass
is secret and shouldn't be committed to git, it is included in the generated .gitignore
to avoid accidental commits.
make
: will run the playbook against the default host(s).
make limit="host1,host2"
: will run the playbook against host1 and host2 instead of the default host(s).
make verbosity=-vvv
: will alter verbosity, the values match ansible commands'. Defaults to not verbose.
Open an issue on this repo, and a PR to match if you can.
Questions are welcome as issues.
MIT © coaxial