first commit
This commit is contained in:
47
tasks/configure.yml
Normal file
47
tasks/configure.yml
Normal file
@ -0,0 +1,47 @@
|
||||
- name: postfix | copy configuration
|
||||
template:
|
||||
src: main.cf.j2
|
||||
dest: /etc/postfix/main.cf
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: restart postfix
|
||||
|
||||
- name: postfix | create /etc/aliases
|
||||
template:
|
||||
src: aliases.j2
|
||||
dest: /etc/aliases
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: newaliases
|
||||
|
||||
- name: postfix | create /etc/mailname
|
||||
template:
|
||||
src: mailname.j2
|
||||
dest: /etc/mailname
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: restart postfix
|
||||
|
||||
- name: postfix | sender relay
|
||||
template:
|
||||
src: sender_relay.j2
|
||||
dest: /etc/postfix/sender_relay
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: restart postfix
|
||||
when: postfix_sender_relay is defined
|
||||
|
||||
- name: postfix | sasl password
|
||||
template:
|
||||
src: sasl_passwd.j2
|
||||
dest: /etc/postfix/sasl_passwd
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: restart postfix
|
||||
when: postfix_sasl_password is defined
|
||||
|
7
tasks/install.yml
Normal file
7
tasks/install.yml
Normal file
@ -0,0 +1,7 @@
|
||||
- name: postfix | install packages
|
||||
apt:
|
||||
name:
|
||||
- postfix
|
||||
state: present
|
||||
tags: ['postfix']
|
||||
|
9
tasks/main.yml
Normal file
9
tasks/main.yml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: requirements
|
||||
include_tasks: requirements.yml
|
||||
|
||||
- name: install
|
||||
include_tasks: install.yml
|
||||
|
||||
- name: configure
|
||||
include_tasks: configure.yml
|
4
tasks/requirements.yml
Normal file
4
tasks/requirements.yml
Normal file
@ -0,0 +1,4 @@
|
||||
- name: update APT Cache
|
||||
apt:
|
||||
update_cache: yes
|
||||
cache_valid_time: 3600
|
Reference in New Issue
Block a user