mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #1151 from holta/openvpn-rapid-support
Fix & Revision to PR #1148 (OpenVPN rapid start during installs)
This commit is contained in:
commit
2f94ee0f48
4 changed files with 39 additions and 18 deletions
|
@ -37,6 +37,12 @@
|
||||||
set_fact:
|
set_fact:
|
||||||
uuid: "{{ stored_uuid.stdout_lines[0] }}"
|
uuid: "{{ stored_uuid.stdout_lines[0] }}"
|
||||||
|
|
||||||
|
- name: SSHD
|
||||||
|
include_role:
|
||||||
|
name: sshd
|
||||||
|
# has no "when: XXXXX_install" flag
|
||||||
|
tags: base, sshd
|
||||||
|
|
||||||
- name: OPENVPN
|
- name: OPENVPN
|
||||||
include_role:
|
include_role:
|
||||||
name: openvpn
|
name: openvpn
|
||||||
|
|
|
@ -3,13 +3,6 @@
|
||||||
- name: ...IS BEGINNING ==================================
|
- name: ...IS BEGINNING ==================================
|
||||||
command: echo
|
command: echo
|
||||||
|
|
||||||
# MANDATORY SO PERHAPS THIS BELONGS IN 3-BASE-SERVER ?
|
|
||||||
- name: SSHD
|
|
||||||
include_role:
|
|
||||||
name: sshd
|
|
||||||
# has no "when: XXXXX_install" flag
|
|
||||||
tags: base, sshd
|
|
||||||
|
|
||||||
- name: Installing dnsmasq
|
- name: Installing dnsmasq
|
||||||
include_tasks: roles/network/tasks/dnsmasq.yml
|
include_tasks: roles/network/tasks/dnsmasq.yml
|
||||||
when: dnsmasq_install
|
when: dnsmasq_install
|
||||||
|
|
|
@ -1,18 +1,40 @@
|
||||||
- name: Disable root login with password
|
- name: Disable root login with password
|
||||||
lineinfile: dest=/etc/ssh/sshd_config
|
lineinfile:
|
||||||
regexp='^PermitRootLogin'
|
dest: /etc/ssh/sshd_config
|
||||||
line='PermitRootLogin without-password'
|
regexp: '^PermitRootLogin'
|
||||||
state=present
|
line: 'PermitRootLogin without-password'
|
||||||
|
state: present
|
||||||
#TODO: use handler to reload ssh
|
#TODO: use handler to reload ssh
|
||||||
|
|
||||||
- name: Enable sshd
|
- name: Create root .ssh
|
||||||
service: name={{ sshd_service }}
|
file:
|
||||||
enabled=yes
|
path: /root/.ssh
|
||||||
state=started
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0700
|
||||||
|
state: directory
|
||||||
|
when: sshd_enabled
|
||||||
|
|
||||||
|
- name: Install dummy root keys as placeholder
|
||||||
|
copy:
|
||||||
|
src: dummy_authorized_keys
|
||||||
|
dest: /root/.ssh/authorized_keys
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0600
|
||||||
|
force: no
|
||||||
|
when: sshd_enabled
|
||||||
|
|
||||||
|
- name: Enable & start sshd
|
||||||
|
service:
|
||||||
|
name: "{{ sshd_service }}"
|
||||||
|
enabled: yes
|
||||||
|
state: started
|
||||||
when: sshd_enabled
|
when: sshd_enabled
|
||||||
|
|
||||||
- name: Disable sshd
|
- name: Disable sshd
|
||||||
service: name={{ sshd_service }}
|
service:
|
||||||
enabled=no
|
name: "{{ sshd_service }}"
|
||||||
state=stopped
|
enabled: no
|
||||||
|
state: stopped
|
||||||
when: not sshd_enabled
|
when: not sshd_enabled
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue