tests: various changes

some minor changes

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit c42c0c3558)
pull/7529/head
Guillaume Abrioux 2024-03-19 18:31:47 +01:00
parent 9ccc4cd7a3
commit 31bbd5f9b8
2 changed files with 18 additions and 40 deletions

View File

@ -58,10 +58,19 @@
# - ansible_facts['distribution_major_version'] | int > 7
# - not is_atomic | bool
- name: update the system
command: dnf update -y
changed_when: false
when: not is_atomic | bool
- name: update the system on RHEL-based OS # noqa: package-latest
ansible.builtin.yum:
name: '*'
state: latest
register: yum_upgrade
when: ansible_facts['os_family'] == 'RedHat'
- name: update the system on Debian-based OS # noqa: package-latest
ansible.builtin.apt:
name: '*'
state: latest
update_cache: true
when: ansible_facts['os_family'] == 'Debian'
- name: get root mount information
set_fact:
@ -72,7 +81,7 @@
ansible.posix.mount:
path: '{{ rootmount.mount }}'
src: '{{ rootmount.device }}'
opts: "noatime,nodiratime{% if ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] | int < 8 %},nobarrier{% endif %}"
opts: "noatime,nodiratime,nobarrier"
fstype: '{{ rootmount.fstype }}'
state: mounted
@ -86,38 +95,7 @@
until: result is succeeded
when: not is_atomic | bool
- name: centos based systems - configure repos
block:
- name: disable fastest mirror detection
ini_file:
path: /etc/yum/pluginconf.d/fastestmirror.conf
section: main
option: enabled
value: 0
- name: install epel
package:
name: epel-release
state: present
register: result
until: result is succeeded
- name: enable local epel repository
ini_file:
path: /etc/yum.repos.d/epel.repo
section: epel
option: baseurl
value: http://apt-mirror.front.sepia.ceph.com/epel7/
- name: disable remote epel repository
ini_file:
path: /etc/yum.repos.d/epel.repo
section: epel
option: metalink
state: absent
when:
- ansible_facts['distribution'] == 'CentOS'
- ansible_facts['distribution_major_version'] | int == 7
- not is_atomic | bool
- name: resize logical volume for root partition to fill remaining free space
- name: Resize logical volume for root partition to fill remaining free space
lvol:
lv: root
vg: atomicos

View File

@ -1,5 +1,5 @@
[tox]
envlist = centos-{container,non_container}-{all_daemons,all_daemons_ipv6,collocation,lvm_osds,shrink_mon,shrink_mgr,shrink_mds,shrink_rbdmirror,shrink_rgw,lvm_batch,add_mons,add_mgrs,add_mdss,add_rbdmirrors,add_rgws,purge,storage_inventory,lvm_auto_discovery,all_in_one,cephadm_adopt,purge_dashboard}
envlist = {centos,ubuntu}-{container,non_container}-{all_daemons,all_daemons_ipv6,collocation,lvm_osds,shrink_mon,shrink_mgr,shrink_mds,shrink_rbdmirror,shrink_rgw,lvm_batch,add_mons,add_mgrs,add_mdss,add_rbdmirrors,add_rgws,purge,storage_inventory,lvm_auto_discovery,all_in_one,cephadm_adopt,purge_dashboard}
centos-non_container-{switch_to_containers}
infra_lv_create
migrate_ceph_disk_to_ceph_volume
@ -263,8 +263,8 @@ setenv=
ANSIBLE_STDOUT_CALLBACK = yaml
non_container: DEV_SETUP = True
# Set the vagrant box image to use
centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
ubuntu: CEPH_ANSIBLE_VAGRANT_BOX = generic/ubuntu2204
centos: CEPH_ANSIBLE_VAGRANT_BOX = centos/stream9
INVENTORY = {env:_INVENTORY:hosts}
container: CONTAINER_DIR = /container
container: PLAYBOOK = site-container.yml.sample