use crb handlers
This commit is contained in:
parent
5d79543340
commit
a0452bf4f9
@ -56,4 +56,8 @@
|
||||
ansible.builtin.service:
|
||||
name: rsyncd
|
||||
state: restarted
|
||||
|
||||
- name: enable_crb
|
||||
ansible.builtin.shell: "set -o pipefail && /usr/bin/crb enable"
|
||||
changed_when: "1 != 1"
|
||||
...
|
||||
|
@ -4,8 +4,8 @@
|
||||
hosts: all
|
||||
become: true
|
||||
vars_files:
|
||||
- vars/mqtt.yml
|
||||
# vars/vaults/encpass.yml
|
||||
- vars/mqtt.yml
|
||||
|
||||
# This is to try to avoid the handler issue in pre/post tasks
|
||||
handlers:
|
||||
@ -24,38 +24,18 @@
|
||||
success_msg: "We are able to run on this node"
|
||||
fail_msg: "/etc/no-ansible exists - skipping run on this node"
|
||||
|
||||
# EPEL and PowerTools are required for ipsilon to function
|
||||
# I also couldn't find an ansible built-in to do this
|
||||
- name: Enable the PowerTools repository
|
||||
community.general.ini_file:
|
||||
dest: /etc/yum.repos.d/Rocky-PowerTools.repo
|
||||
section: powertools
|
||||
option: enabled
|
||||
value: 1
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
when: ansible_distribution_major_version == "8"
|
||||
|
||||
- name: Enable the CRB repository
|
||||
community.general.ini_file:
|
||||
dest: /etc/yum.repos.d/Rocky-CRB.repo
|
||||
section: crb
|
||||
option: enabled
|
||||
value: 1
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
when: ansible_distribution_major_version == "9"
|
||||
|
||||
# The CentOS extras repos has epel-release provided
|
||||
- name: Enable the EPEL repository
|
||||
ansible.builtin.dnf:
|
||||
name: epel-release
|
||||
state: present
|
||||
notify:
|
||||
- enable_crb
|
||||
tags:
|
||||
- packages
|
||||
|
||||
- name: Flush handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
roles:
|
||||
- role: rockylinux.ipagetcert
|
||||
state: present
|
||||
|
@ -4,9 +4,9 @@
|
||||
hosts: all
|
||||
become: true
|
||||
vars_files:
|
||||
- vars/common.yml
|
||||
# vars/vaults/encpass.yml
|
||||
- vars/rabbitmq.yml
|
||||
# vars/vaults/encpass.yml
|
||||
- vars/common.yml
|
||||
- vars/rabbitmq.yml
|
||||
|
||||
# This is to try to avoid the handler issue in pre/post tasks
|
||||
handlers:
|
||||
@ -27,41 +27,22 @@
|
||||
|
||||
# We have separate passwords per rabbitmq env
|
||||
- name: Import rabbitmq passwords
|
||||
include_vars:
|
||||
ansible.builtin.include_vars:
|
||||
file: "vars/vaults/rabbitmq_{{ rabbitmq_env }}.yml"
|
||||
|
||||
# EPEL and PowerTools are required for ipsilon to function
|
||||
# I also couldn't find an ansible built-in to do this
|
||||
- name: Enable the PowerTools repository
|
||||
community.general.ini_file:
|
||||
dest: /etc/yum.repos.d/Rocky-PowerTools.repo
|
||||
section: powertools
|
||||
option: enabled
|
||||
value: 1
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
when: ansible_distribution_major_version == "8"
|
||||
|
||||
- name: Enable the CRB repository
|
||||
community.general.ini_file:
|
||||
dest: /etc/yum.repos.d/Rocky-CRB.repo
|
||||
section: crb
|
||||
option: enabled
|
||||
value: 1
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
when: ansible_distribution_major_version == "9"
|
||||
|
||||
# The extras repos has epel-release provided
|
||||
- name: Enable the EPEL repository
|
||||
dnf:
|
||||
ansible.builtin.dnf:
|
||||
name: epel-release
|
||||
state: present
|
||||
notify:
|
||||
- enable_crb
|
||||
tags:
|
||||
- packages
|
||||
|
||||
- name: Flush handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
# This will change eventually to a rocky-release-messaging repo or to a
|
||||
# rocky-release-rabbitmq repo
|
||||
#- name: Install centos rabbitmq
|
||||
|
Loading…
Reference in New Issue
Block a user