log2mail: task log2mail.yml of evolinux-base converted to a role
This commit is contained in:
parent
56fbe99164
commit
f05a6aa25c
|
@ -19,6 +19,8 @@ The **patch** part is incremented if multiple releases happen the same month
|
|||
|
||||
### Changed
|
||||
|
||||
* log2mail: task log2mail.yml of evolinux-base converted to a role
|
||||
|
||||
### Fixed
|
||||
|
||||
### Removed
|
||||
|
|
|
@ -74,11 +74,6 @@
|
|||
name: postfix
|
||||
state: reloaded
|
||||
|
||||
- name: restart log2mail
|
||||
ansible.builtin.service:
|
||||
name: log2mail
|
||||
state: restarted
|
||||
|
||||
- name: restart systemd-journald
|
||||
ansible.builtin.service:
|
||||
name: systemd-journald.service
|
||||
|
|
|
@ -116,7 +116,8 @@
|
|||
when: evolinux_provider_orange_fce_include | bool
|
||||
|
||||
- name: Override Log2mail service
|
||||
ansible.builtin.import_tasks: log2mail.yml
|
||||
ansible.builtin.include_role:
|
||||
name: evolix/log2mail
|
||||
when: evolinux_log2mail_include | bool
|
||||
|
||||
- ansible.builtin.import_tasks: motd.yml
|
||||
|
|
5
log2mail/handlers/main.yml
Normal file
5
log2mail/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: restart log2mail
|
||||
ansible.builtin.service:
|
||||
name: log2mail
|
||||
state: restarted
|
|
@ -4,15 +4,11 @@
|
|||
src: log2mail.service
|
||||
dest: /etc/systemd/system/log2mail.service
|
||||
mode: "0644"
|
||||
tags:
|
||||
- log2mail
|
||||
|
||||
- name: Remove log2mail sysvinit service
|
||||
ansible.builtin.file:
|
||||
path: /etc/init.d/log2mail
|
||||
state: absent
|
||||
tags:
|
||||
- log2mail
|
||||
|
||||
- name: Enable and start log2mail service
|
||||
ansible.builtin.systemd:
|
||||
|
@ -20,8 +16,6 @@
|
|||
daemon-reload: yes
|
||||
state: started
|
||||
enabled: yes
|
||||
tags:
|
||||
- log2mail
|
||||
|
||||
- name: log2mail evolinux config is absent from default config
|
||||
ansible.builtin.blockinfile:
|
||||
|
@ -29,18 +23,14 @@
|
|||
marker: "# {mark} ANSIBLE MANAGED RULES FOR DEFAULT INSTANCE"
|
||||
state: absent
|
||||
notify: restart log2mail
|
||||
tags:
|
||||
- log2mail
|
||||
|
||||
- name: log2mail evolinux-defaults config is present
|
||||
ansible.builtin.template:
|
||||
src: log2mail/evolinux-defaults.j2
|
||||
src: evolinux-defaults.j2
|
||||
dest: /etc/log2mail/config/evolinux-defaults
|
||||
owner: log2mail
|
||||
group: adm
|
||||
mode: "0640"
|
||||
force: yes
|
||||
notify: restart log2mail
|
||||
tags:
|
||||
- log2mail
|
||||
|
Loading…
Reference in a new issue