Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various changes (backport #7521) #7522

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
---
- name: Configure epel repository
ansible.builtin.package:
name: epel-release
register: result
until: result is succeeded
tags: with_pkg
when:
- ansible_facts['distribution'] == 'Rocky'

- name: Include redhat_community_repository.yml
ansible.builtin.include_tasks: redhat_community_repository.yml
when: ceph_repository == 'community'
Expand Down
52 changes: 15 additions & 37 deletions tests/functional/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand All @@ -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
Expand Down
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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,rocky}-{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
Expand Down Expand Up @@ -263,8 +263,9 @@ 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
rocky: CEPH_ANSIBLE_VAGRANT_BOX = rockylinux/9
INVENTORY = {env:_INVENTORY:hosts}
container: CONTAINER_DIR = /container
container: PLAYBOOK = site-container.yml.sample
Expand Down
Loading