diff --git a/iiab-network b/iiab-network index 5a065e556..9e24154be 100755 --- a/iiab-network +++ b/iiab-network @@ -3,15 +3,17 @@ if [ -f /etc/iiab/iiab.env ] then . /etc/iiab/iiab.env - cd $XSCE_DIR + cd $IIAB_DIR else echo /etc/iiab/iiab.env is missing. Playbook has not been run. exit 1 fi +CWD=`pwd` + if [ ! -f iiab-network.yml ] then - echo "XSCE Playbook not found." + echo "IIAB Playbook not found." echo "Please run this command from the top level of the git repo." echo "Exiting." exit @@ -22,7 +24,7 @@ then touch /etc/iiab/config_vars.yml fi -export ANSIBLE_LOG_PATH="$XSCE_DIR/iiab-network.log" +export ANSIBLE_LOG_PATH="$CWD/iiab-network.log" ansible-playbook -i ansible_hosts iiab-network.yml --connection=local echo "" >> iiab-network.log ls -la /etc/sys*/net*/ifcfg* >> iiab-network.log diff --git a/install-support b/install-support index cd73aade8..b7df01489 100755 --- a/install-support +++ b/install-support @@ -2,6 +2,7 @@ PLAYBOOK="iiab-base.yml" INVENTORY="ansible_hosts" +CWD=`pwd` if [ ! -f $PLAYBOOK ] then @@ -14,5 +15,5 @@ fi sed -i -e "s/openvpn_install: False/openvpn_install: True/" vars/local_vars.yml sed -i -e "s/openvpn_enabled: False/openvpn_enabled: True/" vars/local_vars.yml -export ANSIBLE_LOG_PATH="$XSCE_DIR/iiab-install.log" +export ANSIBLE_LOG_PATH="$CWD/iiab-install.log" ansible-playbook -i $INVENTORY $PLAYBOOK --connection=local diff --git a/roles/1-prep/templates/iiab.env.j2 b/roles/1-prep/templates/iiab.env.j2 index 602256841..b472d4fe6 100644 --- a/roles/1-prep/templates/iiab.env.j2 +++ b/roles/1-prep/templates/iiab.env.j2 @@ -1,7 +1,7 @@ # This is a configuration file for XSCE # It can sourced in a shell script or read into an application -XSCE_BASE_PATH={{ iiab_base }} -XSCE_DIR={{ iiab_dir }} +IIAB_BASE_PATH={{ iiab_base }} +IIAB_DIR={{ iiab_dir }} OS={{ ansible_local.local_facts.os }} OS_VER={{ ansible_local.local_facts.os_ver }} WWWROOT={{ doc_root }} diff --git a/runansible b/runansible index 2a6ea4954..51cee7876 100755 --- a/runansible +++ b/runansible @@ -1,4 +1,8 @@ #!/bin/bash -e +PLAYBOOK="iiab.yml" +INVENTORY="ansible_hosts" +# Pass cmdline options for ansible +ARGS="$@" # copy var files to /etc/iiab for subsequent use mkdir -p /etc/iiab @@ -28,13 +32,14 @@ fi if [ -f /etc/iiab/iiab.env ] then . /etc/iiab/iiab.env - cd $XSCE_DIR + cd $IIAB_DIR else - XSCE_DIR=/opt/iiab/iiab + IIAB_DIR=/opt/iiab/iiab mkdir -p /etc/iiab fi +CWD=`pwd` -if [ ! -f iiab.yml ] +if [ ! -f $PLAYBOOK ] then echo "IIAB Playbook not found." echo "Please run this command from the top level of the git repo." @@ -47,34 +52,10 @@ if [ ! -f /etc/ansible/facts.d/local_facts.fact ]; then fi cp ./scripts/local_facts.fact /etc/ansible/facts.d/local_facts.fact -PLAYBOOK="iiab.yml" -INVENTORY="ansible_hosts" -CWD=`pwd` echo "Running local playbooks! " -XSDOMAIN="" -# Pass in Existing Domain -if [ -f /etc/sysconfig/xs_domain_name ] -then - XSDOMAIN=`cat /etc/sysconfig/xs_domain_name` -fi - -# Or accept Domain on command line -if [ x"$1" != x ] -then - XSDOMAIN=$1 -fi - -# Pass in git location -if [ x"$XSDOMAIN" != x ] -then - ARGS="--extra-vars '{\"iiab_domain\":\"$XSDOMAIN\"}'" -else - ARGS="" -fi - -export ANSIBLE_LOG_PATH="$XSCE_DIR/iiab-install.log" +export ANSIBLE_LOG_PATH="$CWD/iiab-install.log" ansible -m setup -i $INVENTORY localhost --connection=local >> /dev/null ansible-playbook -i $INVENTORY $PLAYBOOK ${ARGS} --connection=local diff --git a/runtags b/runtags index ad8bde5e3..cb3b94af8 100755 --- a/runtags +++ b/runtags @@ -1,20 +1,20 @@ #!/bin/bash - -# copy var files to /etc/iiab for subsequent use - -#./install-init - -# if not the first run, repo location is here +PLAYBOOK="iiab.yml" +INVENTORY="ansible_hosts" +# Pass cmdline options for ansible +ARGS="$@" if [ -f /etc/iiab/iiab.env ] then . /etc/iiab/iiab.env - cd $XSCE_DIR + cd $IIAB_DIR fi -if [ ! -f iiab.yml ] +CWD=`pwd` + +if [ ! -f $PLAYBOOK ] then - echo "XSCE Playbook not found." + echo "IIAB Playbook not found." echo "Please run this command from the top level of the git repo." echo "Exiting." exit @@ -51,5 +51,5 @@ then taglist="netvars,"$taglist fi -export ANSIBLE_LOG_PATH="$XSCE_DIR/iiab-debug.log" +export ANSIBLE_LOG_PATH="$CWD/iiab-debug.log" ansible-playbook -i ansible_hosts iiab.yml --connection=local --tags="""$taglist"""