From 7ce308e8c272c7dcb7e157e99083c0c8ad71d3a0 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Wed, 27 Jan 2016 15:08:44 -0800 Subject: [PATCH] Add a arg based cookbook for ansible --- ansible-cookbook | 26 ++++++++++++++++++++++++++ recipes/default/test-recipe | 4 ++++ recipes/no-sudo/test-recipe | 4 ++++ 3 files changed, 34 insertions(+) create mode 100755 ansible-cookbook create mode 100644 recipes/default/test-recipe create mode 100644 recipes/no-sudo/test-recipe diff --git a/ansible-cookbook b/ansible-cookbook new file mode 100755 index 0000000..10c3b46 --- /dev/null +++ b/ansible-cookbook @@ -0,0 +1,26 @@ +#!/bin/bash + +# Initialization - DO NOT REMOVE +. helpers/initialize + +############################################################## +### Customizations start here ################################ +############################################################## + +# Barebones cookbook that accepts args to run single recipes + +# Get current directory for future use in links +cd $(dirname $0) +PROJECT_DIR=$(pwd) + +detect_package_manager + +init_paths_and_vars + +# Get params +COOKBOOK_NAME=$1 +RECIPIE=$2 +# SET_INSTALLED=$3 + +recipe $RECIPIE +# set_installed $SET_INSTALLED diff --git a/recipes/default/test-recipe b/recipes/default/test-recipe new file mode 100644 index 0000000..c003e72 --- /dev/null +++ b/recipes/default/test-recipe @@ -0,0 +1,4 @@ +#! /bin/bash +# Simple recipe for debugging + +echo "Running default" diff --git a/recipes/no-sudo/test-recipe b/recipes/no-sudo/test-recipe new file mode 100644 index 0000000..ae10e4d --- /dev/null +++ b/recipes/no-sudo/test-recipe @@ -0,0 +1,4 @@ +#! /bin/bash +# Simple recipe for debugging + +echo "Running no-sudo"