initial opensuse support

This commit is contained in:
AJ Schroeder
2024-01-15 10:43:03 -06:00
parent 0e58779cac
commit 53d6b2d1d5
13 changed files with 1450 additions and 17 deletions

View File

@@ -1,10 +1,19 @@
---
- name: "Configure the {{ ansible_facts['distribution'] }} guest operating system."
- name: Prepare the {{ ansible_facts['distribution'] }} guest operating system
include_tasks: "{{ ansible_facts['distribution'] | lower }}.yml"
when: "ansible_facts['distribution'] == 'Debian'"
- name: "Configure the {{ ansible_facts['distribution'] }} guest operating system."
- name: Prepare the {{ ansible_facts['distribution'] }} guest operating system
include_tasks: "{{ ansible_facts['distribution'] | lower }}.yml"
when: "ansible_facts['distribution'] == 'Ubuntu'"
- name: "Configure the {{ ansible_facts['distribution'] }} guest operating system."
- name: Prepare the {{ ansible_facts['distribution'] }} guest operating system
include_tasks: redhat.yml
when: "ansible_facts['distribution'] in ['RedHat', 'CentOS', 'Rocky', 'AlmaLinux', 'OracleLinux']"
- name: Prepare the {{ ansible_facts['distribution'] }} guest operating system
include_tasks: "{{ ansible_facts['distribution'] | lower }}.yml"
when: "ansible_facts['distribution'] == 'Suse'"
...

View File

@@ -0,0 +1,35 @@
---
# 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
...