]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: various changes
authorGuillaume Abrioux <gabrioux@ibm.com>
Tue, 19 Mar 2024 17:31:47 +0000 (18:31 +0100)
committerGuillaume Abrioux <gabrioux@ibm.com>
Wed, 20 Mar 2024 08:30:34 +0000 (09:30 +0100)
some minor changes

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
tests/functional/setup.yml
tox.ini

index 1ec526507b8365e77f79c30b817eb060a308ccd3..683e456540a31a87438472ec8dd88bf55f3c4327 100644 (file)
           #        - 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
 
       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 0870c6658030e0451da45651fb0d86152b355b6e..8b88cdb7d8035be9f79cd2f9b773724f2bc6cc0b 100644 (file)
--- 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
@@ -279,8 +279,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