1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00

Clean+improve openvpn/tasks/main.yml

This commit is contained in:
A Holt 2019-10-09 11:55:03 -04:00 committed by GitHub
parent 65ab8ec2c4
commit 26b37659c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,8 +62,6 @@
with_items:
- /etc/openvpn/keys
- /etc/openvpn/scripts
# Obsolete & unused for ~2 years as of August 2018:
#- /usr/lib/iiab
- name: Configure OpenVPN (BACKS UP FILES IF CHANGED)
template:
@ -84,32 +82,24 @@
- { src: 'openvpn_handle.j2', dest: '/etc/iiab/openvpn_handle', mode: '0644' }
- { 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:
- { src: 'iiab-handle.j2', dest: '/usr/bin/iiab-handle', mode: '0755' }
# Obsolete & unused for ~2 years as of August 2018:
# - { src: 'up_wan', dest: '/usr/lib/iiab/up_wan', mode: '0755' }
# Obsolete & unused for ~2 years as of August 2018:
#- { src: 'start.j2', dest: '/usr/lib/iiab/start', mode: '0755' }
# Obsolete & unused for ~2 years as of August 2018:
#- { src: 'iiab-vpn.conf.in', dest: '/etc/openvpn/iiab-vpn.conf.in', mode: '0644' }
# Obsolete & unused for ~2 years as of August 2018:
#- { src: 'iiab-vpn.j2', dest: '/usr/bin/iiab-vpn', mode: '0755' }
# 2019-10-09: Not recommended for over a year & no longer in use
# - { src: 'iiab-handle.j2', dest: '/usr/bin/iiab-handle', mode: '0755' }
- name: Create iiab-support (symlink to iiab-support in git)
- name: Copy /opt/iiab/iiab/iiab-support to /usr/bin/iiab-support, in case git tree deleted (smaller IIAB installs do this)
file:
src: "{{ iiab_dir }}/iiab-support"
path: /usr/bin/iiab-support
state: link
path: /usr/bin
mode: 0755
- name: Create iiab-support-on (symlink to iiab-support for now)
file:
src: "{{ iiab_dir }}/iiab-support"
src: /usr/bin/iiab-support
path: /usr/bin/iiab-support-on
state: link
- name: Create iiab-support-off (symlink to iiab-remote-off for now)
file:
src: "{{ iiab_dir }}/iiab-remote-off"
src: /usr/bin/iiab-remote-off
path: /usr/bin/iiab-support-off
state: link
@ -125,29 +115,6 @@
path: /usr/bin/iiab-vpn-off
state: link
# up_wan was being installed twice (also above) and was unused for ~2 years
# as of August 2018: (see 15-openvpn below)
#- name: Put up_wan in place (debuntu)
# template:
# src: up_wan
# dest: /usr/lib/iiab/up_wan
# when: is_debuntu | bool
# Contained serious bug (15-openvpn called up-wan instead of up_wan in
# /usr/lib/iiab/ as of August 2018) so evidently unused for ~2 years:
#- name: Install NM dispatcher.d (for older OS's only, where OpenVPN doesn't auto-start openvpn@xscenet)
# template:
# src: 15-openvpn
# dest: /etc/NetworkManager/dispatcher.d/
# #when: not is_debuntu # CONDITION APPEARS TOO BROAD
# when: False # ADD/ITEMIZE ANY OS'S HERE, WHERE TRULY NEC (e.g. older CentOS, if running older OpenVPN?)
# Was obsolete/unused for ~2 years as of August 2018: (replaced by /etc/openvpn/xscenet.conf)
#- name: Check for manually configured OpenVPN tunnel
# stat:
# path: /etc/openvpn/iiab-vpn.conf
# register: stat
# FIXED SOMETIME PRIOR TO AUGUST 2018: earlier versions of Ansible had not
# been working with systemd service names that contained the "@" character.