Creates a boilerplate ansible roles, directories and main.yaml files. This is for the lazy, I am, this is why I becamse a developer.
add the contencts of ansible.sh
to your ~/.bash_profile
of a separate file and source it from the ~/.bash_profile
.
To use call the function:
$ init_ansible_role my_role
creating file: roles/my_role/defaults/main.yaml
creating file: roles/my_role/tasks/main.yaml
creating file: roles/my_role/vars/main.yaml
creating file: roles/my_role/handlers/main.yaml
creating file: roles/my_role/meta/main.yaml
This will create the following directory structure:
roles/
└── my_role
├── defaults
│ └── main.yaml
├── files
├── handlers
│ └── main.yaml
├── meta
│ └── main.yaml
├── tasks
│ └── main.yaml
├── templates
└── vars
└── main.yaml
If the file exists it will be skipped (don't want to overwrite existing files.)