Compare commits
No commits in common. "6c88c4af86d234c099ca9242c8da248b7b15c395" and "424fe250d80aa66e5ff6cb46ff1125c07a0f5dba" have entirely different histories.
6c88c4af86
...
424fe250d8
@ -1 +0,0 @@
|
||||
---
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
|
||||
# sshd
|
||||
|
||||
authorized_keys_file: lab_authorized_keys
|
||||
openssh_configuration_src: sshd_config_arch
|
@ -7,8 +7,6 @@ all:
|
||||
lab:
|
||||
ansible_host: lab.balsillie.net
|
||||
ansible_os_family: Arch
|
||||
ansible_user: ladmin
|
||||
ansible_connection: ssh
|
||||
nodes:
|
||||
node1:
|
||||
ansible_host: node1.balsillie.net
|
||||
|
@ -1,9 +0,0 @@
|
||||
---
|
||||
- name: Configure lab host
|
||||
gather_facts: true
|
||||
hosts: lab
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- sshd
|
||||
- firewall
|
@ -3,4 +3,5 @@ openssh_packages:
|
||||
- openssh
|
||||
openssh_service: sshd.service
|
||||
openssh_configuration_file: /etc/ssh/sshd_config
|
||||
openssh_configuration_mode: 0644
|
||||
openssh_template_src: sshd_config_arch
|
||||
openssh_template_mode: "644"
|
@ -1,9 +0,0 @@
|
||||
---
|
||||
|
||||
- name: restart openssh
|
||||
ansible.builtin.service:
|
||||
name: "{{ openssh_service }}"
|
||||
state: restarted
|
||||
when:
|
||||
- not ansible_check_mode
|
||||
- not openssh_restart_immediately
|
@ -5,34 +5,3 @@
|
||||
state: latest
|
||||
update_cache: true
|
||||
reason: explicit
|
||||
when:
|
||||
- ansible_os_family == 'Arch'
|
||||
|
||||
- name: add authorized keys
|
||||
ansible.builtin.copy:
|
||||
dest: "/home/{{ ansible_user }}/.ssh/authorized_keys"
|
||||
src: "{{ authorized_keys_file }}"
|
||||
mode: 0600
|
||||
owner: "{{ ansible_user }}"
|
||||
group: "{{ ansible_user }}"
|
||||
|
||||
- name: configure openssh
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ openssh_configuration_file }}"
|
||||
src: "{{ openssh_configuration_src }}"
|
||||
mode: "{{ openssh_configuration_mode }}"
|
||||
owner: root
|
||||
group: root
|
||||
notify:
|
||||
- restart openssh
|
||||
|
||||
- name: start and enable openssh
|
||||
ansible.builtin.service:
|
||||
name: "{{ openssh_service }}"
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: flush handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
when:
|
||||
- openssh_restart_immediately
|
Loading…
Reference in New Issue
Block a user