400a3e51e5
... to avoid the following error in rabbitmq_user provider. Cannot parse invalid user line: /usr/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) Change-Id: I22534383ef8f6e0da860f53501eb8ccbc256de87
92 lines
2.2 KiB
YAML
92 lines
2.2 KiB
YAML
- hosts: all
|
|
tasks:
|
|
- name: Ensure legacy workspace directory
|
|
file:
|
|
path: "{{ ansible_user_dir }}/workspace"
|
|
state: directory
|
|
|
|
- block:
|
|
- name: Clean-up system state (CentOS/RHEL)
|
|
dnf:
|
|
name: "{{ item }}"
|
|
state: absent
|
|
become: true
|
|
ignore_errors: true
|
|
with_items:
|
|
- epel-release
|
|
- rdo-release
|
|
- centos-release-openstack-*
|
|
- centos-release-ceph-*
|
|
|
|
- name: Reset dnf modules (CentOS/RHEL)
|
|
shell:
|
|
cmd: |-
|
|
dnf module -y reset {{ item.key }}
|
|
become: true
|
|
with_items: "{{ dnf_modules | default({}) | dict2items }}"
|
|
|
|
- name: Enable dnf modules (CentOS/RHEL)
|
|
shell:
|
|
cmd: |-
|
|
dnf module -y enable {{ item.key }}:{{ item.value }}
|
|
become: true
|
|
with_items: "{{ dnf_modules | default({}) | dict2items }}"
|
|
|
|
- name: Install Ruby dependencies (CentOS/RHEL)
|
|
dnf:
|
|
name: "{{ item }}"
|
|
become: true
|
|
with_items:
|
|
- "@Development tools"
|
|
- libxml2-devel
|
|
- libxslt-devel
|
|
- ruby-devel
|
|
- zlib-devel
|
|
- langpacks-en
|
|
- glibc-langpack-en
|
|
|
|
when:
|
|
- ansible_os_family == 'RedHat'
|
|
|
|
- block:
|
|
- name: install required packages (CentOS)
|
|
dnf:
|
|
name: "{{ item }}"
|
|
state: present
|
|
become: true
|
|
ignore_errors: true
|
|
with_items:
|
|
- python3-pip
|
|
when:
|
|
- ansible_os_family == 'RedHat'
|
|
- ansible_distribution == 'CentOS'
|
|
|
|
- name: Install Ruby dependencies (Ubuntu)
|
|
apt:
|
|
name: "{{ item }}"
|
|
become: true
|
|
when:
|
|
- ansible_os_family == 'Debian'
|
|
- ansible_distribution == "Ubuntu"
|
|
with_items:
|
|
- libxml2-dev
|
|
- libxslt-dev
|
|
- ruby-dev
|
|
- zlib1g-dev
|
|
- python3-pip
|
|
|
|
- name: Install Ruby dependencies (Debian)
|
|
apt:
|
|
name: "{{ item }}"
|
|
become: true
|
|
when:
|
|
- ansible_os_family == 'Debian'
|
|
- ansible_distribution == "Debian"
|
|
with_items:
|
|
- libicu-dev
|
|
- libxml2-dev
|
|
- libxslt1-dev
|
|
- ruby-dev
|
|
- zlib1g-dev
|
|
- python3-pip
|