use crb handlers
This commit is contained in:
parent
5d79543340
commit
a0452bf4f9
@ -56,4 +56,8 @@
|
|||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: rsyncd
|
name: rsyncd
|
||||||
state: restarted
|
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
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
vars_files:
|
vars_files:
|
||||||
# vars/vaults/encpass.yml
|
|
||||||
- vars/mqtt.yml
|
- vars/mqtt.yml
|
||||||
|
# vars/vaults/encpass.yml
|
||||||
|
|
||||||
# This is to try to avoid the handler issue in pre/post tasks
|
# This is to try to avoid the handler issue in pre/post tasks
|
||||||
handlers:
|
handlers:
|
||||||
@ -24,38 +24,18 @@
|
|||||||
success_msg: "We are able to run on this node"
|
success_msg: "We are able to run on this node"
|
||||||
fail_msg: "/etc/no-ansible exists - skipping 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
|
- name: Enable the EPEL repository
|
||||||
ansible.builtin.dnf:
|
ansible.builtin.dnf:
|
||||||
name: epel-release
|
name: epel-release
|
||||||
state: present
|
state: present
|
||||||
|
notify:
|
||||||
|
- enable_crb
|
||||||
tags:
|
tags:
|
||||||
- packages
|
- packages
|
||||||
|
|
||||||
|
- name: Flush handlers
|
||||||
|
ansible.builtin.meta: flush_handlers
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- role: rockylinux.ipagetcert
|
- role: rockylinux.ipagetcert
|
||||||
state: present
|
state: present
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
hosts: all
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
vars_files:
|
vars_files:
|
||||||
- vars/common.yml
|
|
||||||
# vars/vaults/encpass.yml
|
# vars/vaults/encpass.yml
|
||||||
|
- vars/common.yml
|
||||||
- vars/rabbitmq.yml
|
- vars/rabbitmq.yml
|
||||||
|
|
||||||
# This is to try to avoid the handler issue in pre/post tasks
|
# This is to try to avoid the handler issue in pre/post tasks
|
||||||
@ -27,41 +27,22 @@
|
|||||||
|
|
||||||
# We have separate passwords per rabbitmq env
|
# We have separate passwords per rabbitmq env
|
||||||
- name: Import rabbitmq passwords
|
- name: Import rabbitmq passwords
|
||||||
include_vars:
|
ansible.builtin.include_vars:
|
||||||
file: "vars/vaults/rabbitmq_{{ rabbitmq_env }}.yml"
|
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
|
# The extras repos has epel-release provided
|
||||||
- name: Enable the EPEL repository
|
- name: Enable the EPEL repository
|
||||||
dnf:
|
ansible.builtin.dnf:
|
||||||
name: epel-release
|
name: epel-release
|
||||||
state: present
|
state: present
|
||||||
|
notify:
|
||||||
|
- enable_crb
|
||||||
tags:
|
tags:
|
||||||
- packages
|
- packages
|
||||||
|
|
||||||
|
- name: Flush handlers
|
||||||
|
ansible.builtin.meta: flush_handlers
|
||||||
|
|
||||||
# This will change eventually to a rocky-release-messaging repo or to a
|
# This will change eventually to a rocky-release-messaging repo or to a
|
||||||
# rocky-release-rabbitmq repo
|
# rocky-release-rabbitmq repo
|
||||||
#- name: Install centos rabbitmq
|
#- name: Install centos rabbitmq
|
||||||
|
Loading…
Reference in New Issue
Block a user