Skip to content

Instantly share code, notes, and snippets.

@cuongnv23
Created May 10, 2016 14:36
Show Gist options
  • Select an option

  • Save cuongnv23/3f6b085a9aa24a26f30168723ca15a16 to your computer and use it in GitHub Desktop.

Select an option

Save cuongnv23/3f6b085a9aa24a26f30168723ca15a16 to your computer and use it in GitHub Desktop.
ansible-playbook-init
#!/usr/bin/env bash
ANS_FILES="inventory site.yml config.yml"
ANS_DIRS="group_vars host_vars roles yml"
for f in ${ANS_FILES}; do
echo "touch ${f}"
touch ${f}
done
for d in ${ANS_DIRS}; do
if [ ! -d ${d} ]; then
echo "mkdir ${d}"
mkdir ${d}
else
echo "${d} already exists!"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment