ajout support el9
This commit is contained in:
parent
16f7a16d33
commit
356ccc9847
|
@ -1,27 +1,22 @@
|
||||||
---
|
---
|
||||||
|
- name: Include tasks depending on OS
|
||||||
|
ansible.builtin.include_tasks:
|
||||||
|
file: "{{ item }}"
|
||||||
|
apply:
|
||||||
|
tags:
|
||||||
|
- wg-install
|
||||||
|
with_first_found:
|
||||||
|
- "setup-{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}.yml"
|
||||||
|
- "setup-{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}.yml"
|
||||||
|
- "setup-{{ ansible_distribution | lower }}-{{ ansible_distribution_release }}.yml"
|
||||||
|
- "setup-{{ ansible_distribution | lower }}.yml"
|
||||||
|
- "setup-{{ ansible_os_family | lower }}.yml"
|
||||||
|
|
||||||
- name: Copy systemd unit file to server
|
- name: Copy systemd unit file to server
|
||||||
copy:
|
copy:
|
||||||
src: msmtpd.service
|
src: msmtpd.service
|
||||||
dest: /etc/systemd/system/msmtpd.service
|
dest: /usr/lib/systemd/system/msmtpd.service
|
||||||
mode: 0400
|
mode: 0444
|
||||||
when: ansible_os_family == "RedHat"
|
|
||||||
|
|
||||||
- name: Ensure group "msmtp" exists
|
|
||||||
group:
|
|
||||||
name: msmtp
|
|
||||||
state: present
|
|
||||||
when: ansible_os_family == "RedHat"
|
|
||||||
|
|
||||||
- name: Install msmtp
|
|
||||||
yum:
|
|
||||||
name:
|
|
||||||
- "{{ msmtp_rpm_file }}"
|
|
||||||
- mailx
|
|
||||||
state: present
|
|
||||||
disable_gpg_check: yes
|
|
||||||
notify:
|
|
||||||
- test mail
|
|
||||||
- restart msmtpd
|
|
||||||
when: ansible_os_family == "RedHat"
|
when: ansible_os_family == "RedHat"
|
||||||
|
|
||||||
- name: Copy mstprc conf file.
|
- name: Copy mstprc conf file.
|
||||||
|
|
18
tasks/setup-rocky-8.yml
Normal file
18
tasks/setup-rocky-8.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Ensure group "msmtp" exists
|
||||||
|
group:
|
||||||
|
name: msmtp
|
||||||
|
state: present
|
||||||
|
when: ansible_os_family == "RedHat"
|
||||||
|
|
||||||
|
- name: Install msmtp
|
||||||
|
yum:
|
||||||
|
name:
|
||||||
|
- "{{ msmtp_rpm_file }}"
|
||||||
|
- mailx
|
||||||
|
state: present
|
||||||
|
disable_gpg_check: yes
|
||||||
|
notify:
|
||||||
|
- test mail
|
||||||
|
- restart msmtpd
|
||||||
|
when: ansible_os_family == "RedHat"
|
11
tasks/setup-rocky-9.yml
Normal file
11
tasks/setup-rocky-9.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
- name: Install msmtp
|
||||||
|
yum:
|
||||||
|
name:
|
||||||
|
- msmtp
|
||||||
|
- s-nail
|
||||||
|
state: present
|
||||||
|
notify:
|
||||||
|
- test mail
|
||||||
|
- restart msmtpd
|
||||||
|
when: ansible_os_family == "RedHat"
|
Loading…
Reference in a new issue