Skip to content

Commit aa68b06

Browse files
committed
ansible: bump to ansible 2.12
Add required changes to support ansible 2.12 Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
1 parent 4edaab5 commit aa68b06

File tree

11 files changed

+31
-15
lines changed

11 files changed

+31
-15
lines changed

docs/source/index.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ The ``main`` branch should be considered experimental and used with caution.
9393

9494
- ``stable-6.0`` Supports Ceph version ``pacific``. This branch requires Ansible version ``2.10``.
9595

96-
- ``main`` Supports the main branch of Ceph. This branch requires Ansible version ``2.10``.
96+
- ``stable-7.0`` Supports Ceph version ``quincy``. This branch requires Ansible version ``2.12``.
97+
98+
- ``main`` Supports the main (devel) branch of Ceph. This branch requires Ansible version ``2.12``.
9799

98100
.. NOTE:: ``stable-3.0`` and ``stable-3.1`` branches of ceph-ansible are deprecated and no longer maintained.
99101

infrastructure-playbooks/filestore-to-bluestore.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
when: item.1.stdout == 'ceph data'
139139

140140
- name: umount osd data
141-
mount:
141+
ansible.posix.mount:
142142
path: "/var/lib/ceph/osd/{{ cluster }}-{{ (item.0.stdout | from_json).whoami }}"
143143
state: unmounted
144144
with_together:
@@ -147,7 +147,7 @@
147147
when: item.1.stdout == 'ceph data'
148148

149149
- name: umount osd lockbox
150-
mount:
150+
ansible.posix.mount:
151151
path: "/var/lib/ceph/osd-lockbox/{{ (item.0.stdout | from_json).data.uuid }}"
152152
state: unmounted
153153
with_together:
@@ -441,4 +441,4 @@
441441
"This node has been skipped because OSDs are either"
442442
"all bluestore or there's a mix of filestore and bluestore OSDs"
443443
when:
444-
- skip_this_node | bool
444+
- skip_this_node | bool

infrastructure-playbooks/lv-teardown.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
changed_when: false
4141

4242
- name: tear down any existing osd filesystem
43-
mount:
43+
ansible.posix.mount:
4444
path: "{{ item }}"
4545
state: unmounted
4646
with_items: "{{ old_osd_filesystems.stdout_lines }}"

infrastructure-playbooks/purge-cluster.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
with_items: "{{ groups[nfs_group_name] }}"
7676

7777
- name: ensure nfs-ganesha mountpoint(s) are unmounted
78-
mount:
78+
ansible.posix.mount:
7979
path: "{{ item.split(' ')[1] }}"
8080
state: unmounted
8181
with_items:
@@ -434,7 +434,7 @@
434434
- (containerized_deployment | bool or ceph_volume_present.rc == 0)
435435

436436
- name: umount osd data partition
437-
mount:
437+
ansible.posix.mount:
438438
path: "{{ item }}"
439439
state: unmounted
440440
with_items: "{{ mounted_osd.stdout_lines }}"
@@ -801,7 +801,7 @@
801801
listen: "remove data"
802802

803803
- name: umount osd data partition
804-
mount:
804+
ansible.posix.mount:
805805
path: "{{ item }}"
806806
state: unmounted
807807
with_items: "{{ mounted_osd.stdout_lines }}"

infrastructure-playbooks/shrink-osd.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
delegate_to: "{{ item.0 }}"
162162

163163
- name: umount osd lockbox
164-
mount:
164+
ansible.posix.mount:
165165
path: "/var/lib/ceph/osd-lockbox/{{ ceph_osd_data_json[item.2]['data']['uuid'] }}"
166166
state: absent
167167
loop: "{{ _osd_hosts }}"
@@ -173,7 +173,7 @@
173173
- ceph_osd_data_json[item.2]['data']['uuid'] is defined
174174

175175
- name: umount osd data
176-
mount:
176+
ansible.posix.mount:
177177
path: "/var/lib/ceph/osd/{{ cluster }}-{{ item.2 }}"
178178
state: absent
179179
loop: "{{ _osd_hosts }}"

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# These are Python requirements needed to run ceph-ansible main
2-
ansible>=2.10,<2.11,!=2.9.10
2+
ansible-core>=2.12,<2.13
33
netaddr
44
six

requirements.yml

+3
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ collections:
55
version: 1.2.1
66
type: git
77
- name: ansible.utils
8+
version: '>=2.5.0'
9+
- name: community.general
10+
- name: ansible.posix

roles/ceph-validate/tasks/check_system.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
- name: fail on unsupported ansible version
88
fail:
9-
msg: "Ansible version must be 2.10!"
10-
when: ansible_version.minor|int != 10
9+
msg: "Ansible version must be 2.12!"
10+
when: ansible_version.minor|int != 12
1111

1212
- name: fail on unsupported system
1313
fail:

tests/functional/setup.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969

7070
# mount -o remount doesn't work on RHEL 8 for now
7171
- name: add mount options to /
72-
mount:
72+
ansible.posix.mount:
7373
path: '{{ rootmount.mount }}'
7474
src: '{{ rootmount.device }}'
7575
opts: "noatime,nodiratime{% if ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] | int < 8 %},nobarrier{% endif %}"

tests/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
testinfra
33
pytest-xdist
44
pytest
5-
ansible>=2.10,<2.11,!=2.9.10
5+
ansible-core>=2.12,<2.13,!=2.9.10
66
Jinja2>=2.10
77
netaddr
88
mock

tox-update.ini

+11
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ commands=
4040

4141
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/setup.yml
4242

43+
# # use the stable-7.0 branch to deploy an octopus cluster
44+
# git clone -b stable-7.0 --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible
45+
# pip install -r {envdir}/tmp/ceph-ansible/tests/requirements.txt
46+
# bash -c 'ANSIBLE_CONFIG={envdir}/tmp/ceph-ansible/ansible.cfg ansible-playbook -vv -i {envdir}/tmp/ceph-ansible/tests/functional/all_daemons{env:CONTAINER_DIR:}/hosts {envdir}/tmp/ceph-ansible/tests/functional/setup.yml'
47+
# # configure lvm, we exclude osd2 given this node uses lvm batch scenario (see corresponding inventory host file)
48+
# bash -c 'ANSIBLE_CONFIG={envdir}/tmp/ceph-ansible/ansible.cfg ansible-playbook -vv -i {envdir}/tmp/ceph-ansible/tests/functional/all_daemons{env:CONTAINER_DIR:}/hosts {envdir}/tmp/ceph-ansible/tests/functional/lvm_setup.yml --extra-vars "osd_scenario=lvm"'
49+
4350
# configure lvm, we exclude osd2 given this node uses lvm batch scenario (see corresponding inventory host file)
4451
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/lvm_setup.yml --limit 'osds:!osd2'
4552

@@ -53,6 +60,10 @@ commands=
5360
ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \
5461
"
5562

63+
# pip uninstall -y ansible
64+
# pip install -r {toxinidir}/tests/requirements.txt
65+
ansible-galaxy install -r {toxinidir}/requirements.yml -v
66+
5667
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/infrastructure-playbooks/rolling_update.yml --extra-vars "\
5768
ireallymeanit=yes \
5869
ceph_dev_branch={env:UPDATE_CEPH_DEV_BRANCH:main} \

0 commit comments

Comments
 (0)