diff --git a/Makefile b/Makefile index 3732a01..65c535f 100644 --- a/Makefile +++ b/Makefile @@ -10,3 +10,7 @@ lint: ## Lint ansible files with ansible-lint install: ## Install or update requirements ansible-galaxy install -f -r requirements.yml + +role: ## Create a new role based on the default skeleton + @read -p "Enter role name: " name; \ + ansible-galaxy role init --init-path ./roles $$name diff --git a/README.md b/README.md index 90103cd..50aace6 100644 --- a/README.md +++ b/README.md @@ -24,12 +24,11 @@ When creating new roles, you can set up an initial folder structure with Ansible For more information check out the Ansible documentation [here](https://docs.ansible.com/ansible/devel/galaxy/dev_guide.html#using-a-custom-role-skeleton) ``` -cd roles -ansible-galaxy init ROLE_NAME +make role ``` ## License This repository is licensed under GPL-3 and many roles are derived from the awesome [infrastructure](https://git.shivering-isles.com/shivering-isles/infrastructure) repository published by [Sheogorath](https://shivering-isles.com). -Thank you, and so I hope this can be as useful to someone else as Sheogorath's repository was to me. \ No newline at end of file +Thank you, and so I hope this can be as useful to someone else as Sheogorath's repository was to me.