Initial commit
This commit is contained in:
commit
347ab0e0b5
5 changed files with 37 additions and 0 deletions
2
defaults/main.yml
Normal file
2
defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
---
|
||||||
|
mail_gateway_os_supported: False
|
2
meta/main.yml
Normal file
2
meta/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
---
|
||||||
|
galaxy_info:
|
31
tasks/main.yml
Normal file
31
tasks/main.yml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
---
|
||||||
|
- name: Set OS dependent variables
|
||||||
|
ansible.builtin.include_vars: "{{ lookup('first_found', params) }}"
|
||||||
|
vars:
|
||||||
|
params:
|
||||||
|
files:
|
||||||
|
- "{{ ansible_distribution | lower }}_{{ ansible_distribution_version | lower }}.yml"
|
||||||
|
- "{{ ansible_distribution | lower }}_{{ ansible_distribution_major_version | lower }}.yml"
|
||||||
|
- "{{ ansible_distribution | lower }}.yml"
|
||||||
|
- "{{ ansible_os_family | lower }}.yml"
|
||||||
|
- "{{ ansible_system | lower }}.yml"
|
||||||
|
paths:
|
||||||
|
- '{{ role_path }}/vars'
|
||||||
|
ignore_errors: True
|
||||||
|
|
||||||
|
- name: OS is supported
|
||||||
|
ansible.builtin.assert:
|
||||||
|
that: __os_supported
|
||||||
|
quiet: True
|
||||||
|
vars:
|
||||||
|
__os_supported: "{{ lookup('vars', '{}_os_supported'.format(role_name)) | bool }}"
|
||||||
|
|
||||||
|
- name: Install postfix
|
||||||
|
apt:
|
||||||
|
name: postfix
|
||||||
|
state: latest
|
||||||
|
|
||||||
|
#- name: Set postfix's main.cf
|
||||||
|
# template:
|
||||||
|
# src: main.cf.j2
|
||||||
|
# dest: /etc/postfix/main.cf
|
0
templates/main.cf.j2
Normal file
0
templates/main.cf.j2
Normal file
2
vars/debian.yml
Normal file
2
vars/debian.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
---
|
||||||
|
mail_gateway_os_supported: True
|
Loading…
Add table
Add a link
Reference in a new issue