Compare commits

...
2 Commits
Author SHA1 Message Date
jmrothst 0e18e3bdbb Yet another attempt to fix Oracle Linux vs EPEL 2026-08-10 23:08:42 -05:00
jmrothst 44dd3b642b Dovecot service restart vs reload 2026-08-10 22:49:29 -05:00
4 changed files with 18 additions and 3 deletions
+2 -2
View File
@@ -21,7 +21,7 @@
ansible.builtin.service:
enabled: '{{ item.enabled }}'
name: '{{ item.name }}'
state: reloaded
state: '{{ item.state_handler | default("reloaded") }}'
loop: '{{ ensure_dovecot.service_list }}'
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'
name: dovecot-copytls.service
state: started
state_handler: restarted
- enabled: 'yes'
name: dovecot-copytls.timer
state: started
state_handler: restarted
template_list:
- dest: /etc/dovecot/dovecot.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
@@ -23,9 +23,11 @@ service_list:
- enabled: 'yes'
name: dovecot-copytls.service
state: started
state_handler: restarted
- enabled: 'yes'
name: dovecot-copytls.timer
state: started
state_handler: restarted
template_list:
- dest: /etc/dovecot/dovecot.conf
src: '{{ ansible_facts["distribution"] }}/{{ ansible_facts["distribution_major_version"]
+12 -1
View File
@@ -60,13 +60,24 @@
loop_control:
label: '{{ item.name }} will be {{ item.state }}'
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
when:
- ansible_facts["system"] == 'Linux'
- 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:
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
value: '1'
no_extra_spaces: true