From 31bbd5f9b8e4170040fce6465a2921b70a203a6a Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 19 Mar 2024 18:31:47 +0100 Subject: [PATCH] tests: various changes some minor changes Signed-off-by: Guillaume Abrioux (cherry picked from commit c42c0c355884cec984e21d49119c5b84fc489340) --- tests/functional/setup.yml | 52 +++++++++++--------------------------- tox.ini | 6 ++--- 2 files changed, 18 insertions(+), 40 deletions(-) diff --git a/tests/functional/setup.yml b/tests/functional/setup.yml index 1ec526507..683e45654 100644 --- a/tests/functional/setup.yml +++ b/tests/functional/setup.yml @@ -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 diff --git a/tox.ini b/tox.ini index 1aa3fda70..82dd93a54 100644 --- a/tox.ini +++ b/tox.ini @@ -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