Compare commits
2
Commits
9c90a8e628
...
0e18e3bdbb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e18e3bdbb
|
||
|
|
44dd3b642b
|
@@ -21,7 +21,7 @@
|
|||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
enabled: '{{ item.enabled }}'
|
enabled: '{{ item.enabled }}'
|
||||||
name: '{{ item.name }}'
|
name: '{{ item.name }}'
|
||||||
state: reloaded
|
state: '{{ item.state_handler | default("reloaded") }}'
|
||||||
loop: '{{ ensure_dovecot.service_list }}'
|
loop: '{{ ensure_dovecot.service_list }}'
|
||||||
loop_control:
|
loop_control:
|
||||||
label: '{{ item.name }} will be reloaded'
|
label: '{{ item.name }} will be {{ item.state_handler | default("reloaded") }}'
|
||||||
|
|||||||
@@ -23,9 +23,11 @@ service_list:
|
|||||||
- enabled: 'yes'
|
- enabled: 'yes'
|
||||||
name: dovecot-copytls.service
|
name: dovecot-copytls.service
|
||||||
state: started
|
state: started
|
||||||
|
state_handler: restarted
|
||||||
- enabled: 'yes'
|
- enabled: 'yes'
|
||||||
name: dovecot-copytls.timer
|
name: dovecot-copytls.timer
|
||||||
state: started
|
state: started
|
||||||
|
state_handler: restarted
|
||||||
template_list:
|
template_list:
|
||||||
- dest: /etc/dovecot/dovecot.conf
|
- dest: /etc/dovecot/dovecot.conf
|
||||||
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
|
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
|
||||||
|
|||||||
@@ -23,9 +23,11 @@ service_list:
|
|||||||
- enabled: 'yes'
|
- enabled: 'yes'
|
||||||
name: dovecot-copytls.service
|
name: dovecot-copytls.service
|
||||||
state: started
|
state: started
|
||||||
|
state_handler: restarted
|
||||||
- enabled: 'yes'
|
- enabled: 'yes'
|
||||||
name: dovecot-copytls.timer
|
name: dovecot-copytls.timer
|
||||||
state: started
|
state: started
|
||||||
|
state_handler: restarted
|
||||||
template_list:
|
template_list:
|
||||||
- dest: /etc/dovecot/dovecot.conf
|
- dest: /etc/dovecot/dovecot.conf
|
||||||
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
|
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
|
||||||
|
|||||||
@@ -60,13 +60,24 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
label: '{{ item.name }} will be {{ item.state }}'
|
label: '{{ item.name }} will be {{ item.state }}'
|
||||||
notify: [Ensure_Repo_Epel.Package_Facts, Ensure_Repo_Epel.Service_Facts]
|
notify: [Ensure_Repo_Epel.Package_Facts, Ensure_Repo_Epel.Service_Facts]
|
||||||
|
- name: Read Oracle EPEL Repo File
|
||||||
|
when:
|
||||||
|
- ansible_facts["system"] == 'Linux'
|
||||||
|
- ansible_facts["distribution"] == 'OracleLinux'
|
||||||
|
ansible.builtin.slurp:
|
||||||
|
src: "/etc/yum.repos.d/oracle-epel-ol{{ ansible_facts['distribution_major_version'] }}.repo"
|
||||||
|
register: oracle_epel_repo_file
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Prioritize Oracle Epel Repo
|
- name: Prioritize Oracle Epel Repo
|
||||||
when:
|
when:
|
||||||
- ansible_facts["system"] == 'Linux'
|
- ansible_facts["system"] == 'Linux'
|
||||||
- ansible_facts["distribution"] == 'OracleLinux'
|
- ansible_facts["distribution"] == 'OracleLinux'
|
||||||
|
- oracle_epel_repo_file.content is defined
|
||||||
|
- (oracle_epel_repo_file.content | b64decode | community.general.from_ini).keys() | select('search', '_EPEL') | length > 0
|
||||||
community.general.ini_file:
|
community.general.ini_file:
|
||||||
path: "/etc/yum.repos.d/oracle-epel-ol{{ ansible_facts['distribution_major_version'] }}.repo"
|
path: "/etc/yum.repos.d/oracle-epel-ol{{ ansible_facts['distribution_major_version'] }}.repo"
|
||||||
section: "ol{{ ansible_facts['distribution_major_version'] }}_developer_EPEL"
|
section: "{{ (oracle_epel_repo_file.content | b64decode | community.general.from_ini).keys() | select('search', '_EPEL') | first }}"
|
||||||
option: priority
|
option: priority
|
||||||
value: '1'
|
value: '1'
|
||||||
no_extra_spaces: true
|
no_extra_spaces: true
|
||||||
|
|||||||
Reference in New Issue
Block a user