This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
function init_ansible_role { | |
if [[ ! -n $1 ]]; then | |
echo no init | |
return | |
fi | |
mkdir -p roles/${1}/{defaults,tasks,files,templates,vars,handlers,meta} | |
for i in defaults tasks vars handlers meta; do | |
if [[ ! -f roles/${1}/${i}/main.yaml ]]; then | |
echo creating file: roles/${1}/${i}/main.yaml |