mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Combine iiab-support & install-support
This commit is contained in:
parent
f3ccf6e2f9
commit
31b01af49e
4 changed files with 16 additions and 34 deletions
6
roles/openvpn/templates/iiab-support → iiab-support
Normal file → Executable file
6
roles/openvpn/templates/iiab-support → iiab-support
Normal file → Executable file
|
@ -1,4 +1,6 @@
|
|||
#!/bin/bash
|
||||
PLAYBOOK="install-support.yml"
|
||||
INVENTORY="ansible_hosts"
|
||||
|
||||
# openvpn_handle is stored in 2 files on disk, one slightly stripped down (from
|
||||
# the other) due to Ansible. So we emulate Ansible's behavior, when reading from
|
||||
|
@ -53,7 +55,9 @@ else
|
|||
echo "openvpn_install: True" >> /etc/iiab/local_vars.yml
|
||||
fi
|
||||
cd /opt/iiab/iiab
|
||||
./runrole 1-prep
|
||||
CWD=`pwd`
|
||||
export ANSIBLE_LOG_PATH="$CWD/iiab-install.log"
|
||||
ansible-playbook -i $INVENTORY $PLAYBOOK --connection=local
|
||||
echo
|
||||
fi
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo -e "\n\n\e[41m DEPRECATED PLEASE RUN 'iiab-support' INSTEAD \e[0m\n\n"
|
||||
|
||||
read -p "Continue? [y/N] " ans
|
||||
if [ "$ans" != "y" ]; then
|
||||
echo
|
||||
exit
|
||||
fi
|
||||
|
||||
PLAYBOOK="install-support.yml"
|
||||
INVENTORY="ansible_hosts"
|
||||
CWD=`pwd`
|
||||
|
||||
export ANSIBLE_LOG_PATH="$CWD/iiab-install.log"
|
||||
|
||||
if [ ! -f $PLAYBOOK ]; then
|
||||
echo -e "\nEXITING: $PLAYBOOK not found.\n"
|
||||
echo -e "Please run this command from /opt/iiab/iiab (top of git repo).\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sed -i -e "s/^openvpn_install:.*/openvpn_install: True/" /etc/iiab/local_vars.yml
|
||||
sed -i -e "s/^openvpn_enabled:.*/openvpn_enabled: True/" /etc/iiab/local_vars.yml
|
||||
|
||||
ansible-playbook -i $INVENTORY $PLAYBOOK --connection=local
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
roles:
|
||||
- { role: 0-init, tags: ['0-init'] }
|
||||
#- { role: 1-prep, tags: ['1-prep', 'platform', 'base'] }
|
||||
- { role: 1-prep, tags: ['1-prep'] }
|
||||
#- { role: openvpn, tags: ['openvpn'] } # FASTER ALTERNATIVE THAN 1-prep (if 1-prep was already run!)
|
||||
# BETTER YET, SEE: /usr/bin/iiab-support for a much friendlier UX, that only runs 1-prep when necessary.
|
||||
- { role: sshd, tags: ['sshd'] }
|
||||
- { role: iiab-admin, tags: ['iiab-admin'] }
|
||||
- { role: openvpn, tags: ['openvpn'] }
|
||||
|
|
|
@ -82,7 +82,6 @@
|
|||
- { src: 'silence', dest: '/etc/openvpn/scripts/silence', mode: '0755' }
|
||||
- { src: 'xscenet.conf.j2', dest: '/etc/openvpn/xscenet.conf', mode: '0644' }
|
||||
- { src: 'openvpn_handle.j2', dest: '/etc/iiab/openvpn_handle', mode: '0644' }
|
||||
- { src: 'iiab-support', dest: '/usr/bin/iiab-support', mode: '0755' }
|
||||
- { src: 'iiab-remote-on.j2', dest: '/usr/bin/iiab-remote-on', mode: '0755' }
|
||||
- { src: 'iiab-remote-off', dest: '/usr/bin/iiab-remote-off', mode: '0755' }
|
||||
# Comment out in future? Not recommended as of August 2018:
|
||||
|
@ -96,15 +95,21 @@
|
|||
# Obsolete & unused for ~2 years as of August 2018:
|
||||
#- { src: 'iiab-vpn.j2', dest: '/usr/bin/iiab-vpn', mode: '0755' }
|
||||
|
||||
- name: Create iiab-support (symlink to iiab-support in git)
|
||||
file:
|
||||
src: "{{ iiab_dir }}/iiab-support"
|
||||
path: /usr/bin/iiab-support
|
||||
state: link
|
||||
|
||||
- name: Create iiab-support-on (symlink to iiab-support for now)
|
||||
file:
|
||||
src: /usr/bin/iiab-support
|
||||
src: "{{ iiab_dir }}/iiab-support"
|
||||
path: /usr/bin/iiab-support-on
|
||||
state: link
|
||||
|
||||
- name: Create iiab-support-off (symlink to iiab-remote-off for now)
|
||||
file:
|
||||
src: /usr/bin/iiab-remote-off
|
||||
src: "{{ iiab_dir }}/iiab-remote-off"
|
||||
path: /usr/bin/iiab-support-off
|
||||
state: link
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue