diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-03-22 13:48:42 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-03-22 13:48:42 -0300 |
commit | 38defecb3a09b175ff9f3520a146358a5250c5a3 (patch) | |
tree | ea9770f19d307c70619c76357ebfc621dfce34a4 | |
parent | bdd58beb8ccf1fc8abf43ba4f940e9c438ec9297 (diff) | |
download | hydra-38defecb3a09b175ff9f3520a146358a5250c5a3.tar.gz hydra-38defecb3a09b175ff9f3520a146358a5250c5a3.tar.bz2 |
Rename 'hiera' to 'config'
-rw-r--r-- | lib/hydra/deploy | 26 | ||||
-rwxr-xr-x | share/hydra/deploy | 4 | ||||
-rwxr-xr-x | share/hydra/newnode | 12 | ||||
-rwxr-xr-x | share/hydra/nodes | 6 | ||||
-rwxr-xr-x | share/hydra/whereis | 8 |
5 files changed, 28 insertions, 28 deletions
diff --git a/lib/hydra/deploy b/lib/hydra/deploy index 771c42e..f7a8f02 100644 --- a/lib/hydra/deploy +++ b/lib/hydra/deploy @@ -5,7 +5,7 @@ function hydra_deploy_setup { # Common parameters # Exclude eventual keys and version control files DEPLOY_DEPENDENCIES="puppet-common ruby-sqlite3 ruby-activerecord ruby-activerecord-deprecated-finders augeas-tools" - DEPLOY_RSYNC="rsync -CrltDvpq --no-owner --exclude=/ssl --exclude=keys --exclude=site_keys --exclude=hiera/secrets --delete --rsync-path" + DEPLOY_RSYNC="rsync -CrltDvpq --no-owner --exclude=/ssl --exclude=keys --exclude=site_keys --exclude=config/secrets --delete --rsync-path" RSYNC_PATH="rsync -q" if [ "$1" == "remote" ]; then @@ -61,8 +61,8 @@ function hydra_deploy_setup { # Common parameters DOMAIN="`echo $FQDN | cut -d . -f 2-`" - ROLE="`hydra_yaml_param nodo::role $HYDRA_FOLDER/puppet/hiera/node/$FQDN.yaml`" - LOCATION="`hydra_yaml_param nodo::location $HYDRA_FOLDER/puppet/hiera/node/$FQDN.yaml`" + ROLE="`hydra_yaml_param nodo::role $HYDRA_FOLDER/puppet/config/node/$FQDN.yaml`" + LOCATION="`hydra_yaml_param nodo::location $HYDRA_FOLDER/puppet/config/node/$FQDN.yaml`" # Puppet command if [ -e "$HYDRA_FOLDER/puppet/bin/deploy" ]; then @@ -109,7 +109,7 @@ function hydra_deploy_mkdirs { $DEPLOY_COMMAND chmod -R 640 /etc/puppet } -# Copy hiera secrets +# Copy config secrets function hydra_deploy_copy_secrets { local location="$1" @@ -117,22 +117,22 @@ function hydra_deploy_copy_secrets { location="remote" fi - $DEPLOY_COMMAND mkdir -p $FOLDER/etc/puppet/hiera/secrets/{domain,location,node,role} + $DEPLOY_COMMAND mkdir -p $FOLDER/etc/puppet/config/secrets/{domain,location,node,role} - if [ ! -z "$DOMAIN" ] && [ -e "$HYDRA_FOLDER/puppet/hiera/secrets/domain/$DOMAIN.yaml" ]; then - hydra_deploy_copy $location $HYDRA_FOLDER/puppet/hiera/secrets/domain/$DOMAIN.yaml $DEPLOY_DEST/etc/puppet/hiera/secrets/domain/ + if [ ! -z "$DOMAIN" ] && [ -e "$HYDRA_FOLDER/puppet/config/secrets/domain/$DOMAIN.yaml" ]; then + hydra_deploy_copy $location $HYDRA_FOLDER/puppet/config/secrets/domain/$DOMAIN.yaml $DEPLOY_DEST/etc/puppet/config/secrets/domain/ fi - if [ ! -z "$LOCATION" ] && [ -e "$HYDRA_FOLDER/puppet/hiera/secrets/location/$LOCATION.yaml" ]; then - hydra_deploy_copy $location $HYDRA_FOLDER/puppet/hiera/secrets/location/$LOCATION.yaml $DEPLOY_DEST/etc/puppet/hiera/secrets/location/ + if [ ! -z "$LOCATION" ] && [ -e "$HYDRA_FOLDER/puppet/config/secrets/location/$LOCATION.yaml" ]; then + hydra_deploy_copy $location $HYDRA_FOLDER/puppet/config/secrets/location/$LOCATION.yaml $DEPLOY_DEST/etc/puppet/config/secrets/location/ fi - if [ ! -z "$ROLE" ] && [ -e "$HYDRA_FOLDER/puppet/hiera/secrets/role/$ROLE.yaml" ]; then - hydra_deploy_copy $location $HYDRA_FOLDER/puppet/hiera/secrets/role/$ROLE.yaml $DEPLOY_DEST/etc/puppet/hiera/secrets/role/ + if [ ! -z "$ROLE" ] && [ -e "$HYDRA_FOLDER/puppet/config/secrets/role/$ROLE.yaml" ]; then + hydra_deploy_copy $location $HYDRA_FOLDER/puppet/config/secrets/role/$ROLE.yaml $DEPLOY_DEST/etc/puppet/config/secrets/role/ fi - if [ ! -z "$FQDN" ] && [ -e "$HYDRA_FOLDER/puppet/hiera/secrets/node/$FQDN.yaml" ]; then - hydra_deploy_copy $location $HYDRA_FOLDER/puppet/hiera/secrets/node/$FQDN.yaml $DEPLOY_DEST/etc/puppet/hiera/secrets/node/ + if [ ! -z "$FQDN" ] && [ -e "$HYDRA_FOLDER/puppet/config/secrets/node/$FQDN.yaml" ]; then + hydra_deploy_copy $location $HYDRA_FOLDER/puppet/config/secrets/node/$FQDN.yaml $DEPLOY_DEST/etc/puppet/config/secrets/node/ fi } diff --git a/share/hydra/deploy b/share/hydra/deploy index efbaeba..19150a8 100755 --- a/share/hydra/deploy +++ b/share/hydra/deploy @@ -65,7 +65,7 @@ for node in $NODES; do echo "Syncing configuration..." $DEPLOY_RSYNC "$RSYNC_PATH" $DEPLOY_OPTS - # Copy hiera configuration + # Copy config configuration hydra_deploy_copy_secrets folder # Run puppet, overriding FQDN @@ -110,7 +110,7 @@ EOF echo "Syncing configuration..." $DEPLOY_RSYNC "$RSYNC_PATH" $DEPLOY_OPTS - # Copy hiera configuration + # Copy configuration hydra_deploy_copy_secrets remote # Run puppet diff --git a/share/hydra/newnode b/share/hydra/newnode index 76d4a54..57c5885 100755 --- a/share/hydra/newnode +++ b/share/hydra/newnode @@ -38,7 +38,7 @@ if [ -z "$NODE" ]; then elif [ ! -e "$HYDRA_FOLDER/config/domain" ]; then echo "fatal: please configure your domain at $HYDRA_FOLDER/config/domain" exit 1 -elif [ -e "$HYDRA_FOLDER/puppet/hiera/node/$NODE.yaml" ]; then +elif [ -e "$HYDRA_FOLDER/puppet/config/node/$NODE.yaml" ]; then echo "fatal: node $NODE already defined" exit 1 fi @@ -63,12 +63,12 @@ fi #fi # Copy YAML template -mkdir -p $HYDRA_FOLDER/puppet/hiera/node -cp $YAML $HYDRA_FOLDER/puppet/hiera/node/$NODE.yaml +mkdir -p $HYDRA_FOLDER/puppet/config/node +cp $YAML $HYDRA_FOLDER/puppet/config/node/$NODE.yaml # Setup secret YAML template -mkdir -p $HYDRA_FOLDER/puppet/hiera/secrets/node -echo "---" > $HYDRA_FOLDER/puppet/hiera/secrets/node/$NODE.yaml +mkdir -p $HYDRA_FOLDER/puppet/config/secrets/node +echo "---" > $HYDRA_FOLDER/puppet/config/secrets/node/$NODE.yaml # Copy node template #mkdir -p $HYDRA_FOLDER/puppet/manifests/nodes @@ -80,7 +80,7 @@ echo "---" > $HYDRA_FOLDER/puppet/hiera/secrets/node/$NODE.yaml # Add to git ( cd $HYDRA_FOLDER/puppet - git add manifests/nodes/$NODE.pp hiera/node/$NODE.yaml hiera/secrets/node/$NODE.yaml + git add manifests/nodes/$NODE.pp config/node/$NODE.yaml config/secrets/node/$NODE.yaml #if [ -e 'manifests/site.pp' ]; then # git add manifests/site.pp diff --git a/share/hydra/nodes b/share/hydra/nodes index e2a318d..a80e6c1 100755 --- a/share/hydra/nodes +++ b/share/hydra/nodes @@ -18,8 +18,8 @@ # Get a list of puppet node files function hydra_node_files { - if [ -d "$PUPPET/hiera/node/" ]; then - FILES="$PUPPET/hiera/node/*" + if [ -d "$PUPPET/config/node/" ]; then + FILES="$PUPPET/config/node/*" fi } @@ -49,7 +49,7 @@ hydra_node_files # Get nodes if [ ! -z "$CLASS" ]; then hydra_nodes | while read node; do - find $PUPPET/hiera -name "$node.yaml" + find $PUPPET/config -name "$node.yaml" done | while read candidate; do if grep -e "$CLASS" $candidate | grep -qe "^nodo::role"; then basename $candidate .yaml diff --git a/share/hydra/whereis b/share/hydra/whereis index 515218b..8c09839 100755 --- a/share/hydra/whereis +++ b/share/hydra/whereis @@ -38,12 +38,12 @@ echo "-------------------------------------------------------------------------- echo "" # Is it a node? -if [ -e "$PUPPET/hiera/node/$LAYER.$DOMAIN.yaml" ]; then - echo "Defined as a node at hiera/node/$LAYER.$DOMAIN.yaml" +if [ -e "$PUPPET/config/node/$LAYER.$DOMAIN.yaml" ]; then + echo "Defined as a node at config/node/$LAYER.$DOMAIN.yaml" echo "Configuration:" echo "" - grep "nodo::role:" $PUPPET/hiera/node/$LAYER.$DOMAIN.yaml - grep "nodo::location:" $PUPPET/hiera/node/$LAYER.$DOMAIN.yaml + grep "nodo::role:" $PUPPET/config/node/$LAYER.$DOMAIN.yaml + grep "nodo::location:" $PUPPET/config/node/$LAYER.$DOMAIN.yaml fi # DNS config |