Skip to content

Instantly share code, notes, and snippets.

@shakahl
Forked from proxypoke/mkrole
Created July 20, 2016 09:44
Show Gist options
  • Save shakahl/e008ed67e0a33a8a5df681d317e1e497 to your computer and use it in GitHub Desktop.
Save shakahl/e008ed67e0a33a8a5df681d317e1e497 to your computer and use it in GitHub Desktop.
mkrole - create an ansible role skeleton
#!/bin/sh
# create the directory structure and some files
# for an ansible role
ROLE=$1
if [ -z "$ROLE" ]; then
echo "need a role name"
exit 1
fi
mkdir -p $ROLE/{tasks,handlers,templates,files,vars,meta}
echo "---" | tee $ROLE/{tasks,handlers,vars,meta}/main.yml > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment