initial opensuse support
This commit is contained in:
@@ -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'"
|
||||
|
||||
...
|
||||
35
ansible/roles/configure/tasks/suse.yml
Normal file
35
ansible/roles/configure/tasks/suse.yml
Normal 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
|
||||
|
||||
...
|
||||
Reference in New Issue
Block a user