35 lines
835 B
YAML
35 lines
835 B
YAML
---
|
|
|
|
# Tasks for unregistering from SUSE Customer Center.
|
|
- name: "Unregistering from SUSE Customer Center."
|
|
command:
|
|
cmd: "{{ item }}"
|
|
loop:
|
|
- SUSEConnect -d
|
|
- SUSEConnect --cleanup
|
|
|
|
# Tasks for configuring SSH for public key authentication.
|
|
- name: "Configuring SSH for Public Key Authentication."
|
|
block:
|
|
- lineinfile:
|
|
path: /etc/ssh/sshd_config
|
|
regexp: '^PermitRootLogin'
|
|
line: 'PermitRootLogin no'
|
|
- lineinfile:
|
|
path: /etc/ssh/sshd_config
|
|
regexp: '^PubkeyAuthentication'
|
|
line: 'PubkeyAuthentication yes'
|
|
|
|
# Tasks for setting the hostname.
|
|
- name: "Setting the hostname."
|
|
hostname:
|
|
name: "localhost"
|
|
|
|
# Tasks for restarting the SSH daemon.
|
|
- name: "Restarting the SSH daemon."
|
|
systemd:
|
|
name: sshd
|
|
state: restarted
|
|
daemon_reload: true
|
|
|
|
... |