]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ansible: bump to ansible 2.12
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 14 Jun 2022 16:18:36 +0000 (18:18 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 22 Jun 2022 05:17:32 +0000 (07:17 +0200)
Add required changes to support ansible 2.12

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit aa68b06c99f09111effbdf3b3ac5efe99b5e92f6)

docs/source/index.rst
infrastructure-playbooks/filestore-to-bluestore.yml
infrastructure-playbooks/lv-teardown.yml
infrastructure-playbooks/purge-cluster.yml
infrastructure-playbooks/shrink-osd.yml
requirements.txt
requirements.yml
roles/ceph-validate/tasks/check_system.yml
tests/functional/setup.yml
tests/requirements.txt
tox-update.ini

index 083432de4380d3d9613381f2e08be0ad36edf5c7..515643f2d9adb6f7836500e3d19631aa607ca283 100644 (file)
@@ -93,7 +93,9 @@ The ``master`` branch should be considered experimental and used with caution.
 
 - ``stable-6.0`` Supports Ceph version ``pacific``. This branch requires Ansible version ``2.9``.
 
-- ``master`` Supports the master branch of Ceph. This branch requires Ansible version ``2.10``.
+- ``stable-7.0`` Supports Ceph version ``quincy``. This branch requires Ansible version ``2.12``.
+
+- ``main`` Supports the main (devel) branch of Ceph. This branch requires Ansible version ``2.12``.
 
 .. NOTE:: ``stable-3.0`` and ``stable-3.1`` branches of ceph-ansible are deprecated and no longer maintained.
 
index 0a8430e53395fc5375a40c77bdefbca914ec83c8..659d54c8badfb252d05610cc1377b9b555fd2a76 100644 (file)
               when: item.1.stdout == 'ceph data'
 
             - name: umount osd data
-              mount:
+              ansible.posix.mount:
                 path: "/var/lib/ceph/osd/{{ cluster }}-{{ (item.0.stdout | from_json).whoami }}"
                 state: unmounted
               with_together:
               when: item.1.stdout == 'ceph data'
 
             - name: umount osd lockbox
-              mount:
+              ansible.posix.mount:
                 path: "/var/lib/ceph/osd-lockbox/{{ (item.0.stdout | from_json).data.uuid }}"
                 state: unmounted
               with_together:
           "This node has been skipped because OSDs are either"
           "all bluestore or there's a mix of filestore and bluestore OSDs"
       when:
-        - skip_this_node | bool
\ No newline at end of file
+        - skip_this_node | bool
index b9ea569cb72afc214f01327674ba8c9daace5239..4d0654c38ca784b84f1241777e130995734fc50f 100644 (file)
@@ -40,7 +40,7 @@
     changed_when: false
 
   - name: tear down any existing osd filesystem
-    mount:
+    ansible.posix.mount:
       path: "{{ item }}"
       state: unmounted
     with_items: "{{ old_osd_filesystems.stdout_lines }}"
index 50282935b658def1421401acfa9e5eb26564e629..d3a7abddee242e9c3ea088fabbfb41abf15500b4 100644 (file)
@@ -75,7 +75,7 @@
           with_items: "{{ groups[nfs_group_name] }}"
 
         - name: ensure nfs-ganesha mountpoint(s) are unmounted
-          mount:
+          ansible.posix.mount:
             path: "{{ item.split(' ')[1] }}"
             state: unmounted
           with_items:
         - (containerized_deployment | bool or ceph_volume_present.rc == 0)
 
     - name: umount osd data partition
-      mount:
+      ansible.posix.mount:
         path: "{{ item }}"
         state: unmounted
       with_items: "{{ mounted_osd.stdout_lines }}"
       listen: "remove data"
 
     - name: umount osd data partition
-      mount:
+      ansible.posix.mount:
         path: "{{ item }}"
         state: unmounted
       with_items: "{{ mounted_osd.stdout_lines }}"
index 42d96dddd7203a9befde9ede58604ac76ed89a88..b4255f47c0d90400cbbf4272c363a4e422fd5813 100644 (file)
       delegate_to: "{{ item.0 }}"
 
     - name: umount osd lockbox
-      mount:
+      ansible.posix.mount:
         path: "/var/lib/ceph/osd-lockbox/{{ ceph_osd_data_json[item.2]['data']['uuid'] }}"
         state: absent
       loop: "{{ _osd_hosts }}"
         - ceph_osd_data_json[item.2]['data']['uuid'] is defined
 
     - name: umount osd data
-      mount:
+      ansible.posix.mount:
         path: "/var/lib/ceph/osd/{{ cluster }}-{{ item.2 }}"
         state: absent
       loop: "{{ _osd_hosts }}"
index b8b6274aac01d5f117a8a69634242971e5154a76..4ed60d62d3b86d0b4499a91798a331f0469b11d3 100644 (file)
@@ -1,4 +1,4 @@
-# These are Python requirements needed to run ceph-ansible master
-ansible>=2.10,<2.11,!=2.9.10
+# These are Python requirements needed to run ceph-ansible main
+ansible-core>=2.12,<2.13
 netaddr
 six
index 9ac7ecfcb5205d470e96535e72651fb152dca201..67a6752167df2b24f83e61414a31d6a5eb2db127 100644 (file)
@@ -4,3 +4,7 @@ collections:
   - name: https://opendev.org/openstack/ansible-config_template
     version: 1.2.1
     type: git
+  - name: ansible.utils
+    version: '>=2.5.0'
+  - name: community.general
+  - name: ansible.posix
index dc8cdd6fd92bd9d1e4d4515cc4ab0a1d80c7e756..d404530249c2fb9ffffdcb03e17d385a14e593f7 100644 (file)
@@ -6,8 +6,8 @@
 
 - name: fail on unsupported ansible version
   fail:
-    msg: "Ansible version must be 2.10!"
-  when: ansible_version.minor|int != 10
+    msg: "Ansible version must be 2.12!"
+  when: ansible_version.minor|int != 12
 
 - name: fail on unsupported system
   fail:
index c72db297c9bc21d11b3eb8362515a26c7b53de06..d06a6e90a56092df1566d741c2f259c4d87d3fb0 100644 (file)
@@ -69,7 +69,7 @@
 
     # mount -o remount doesn't work on RHEL 8 for now
     - name: add mount options to /
-      mount:
+      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 %}"
index 474fa6047d9807a956c07a774152b93e49ae0396..bb6740a464d722282648bb3712377f7d5ae5ac06 100644 (file)
@@ -1,8 +1,8 @@
 # These are Python requirements needed to run the functional tests
-testinfra>=3,<4
-pytest-xdist==1.28.0
-pytest>=4.6,<5.0
-ansible>=2.10,<2.11,!=2.9.10
+testinfra
+pytest-xdist
+pytest
+ansible-core>=2.12,<2.13
 Jinja2>=2.10
 netaddr
 mock
index a578e3e38bda3eb9c30dbe5cf475e71b6b227937..94ca977fdbe9e151d17649868a8e8bc7f3be3f8e 100644 (file)
@@ -43,6 +43,13 @@ commands=
 
   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'
 
+#  # use the stable-7.0 branch to deploy an octopus cluster
+#  git clone -b stable-7.0 --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible
+#  pip install -r {envdir}/tmp/ceph-ansible/tests/requirements.txt
+#  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'
+#  # configure lvm, we exclude osd2 given this node uses lvm batch scenario (see corresponding inventory host file)
+#  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"'
+
   # configure lvm, we exclude osd2 given this node uses lvm batch scenario (see corresponding inventory host file)
   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" --limit "osds:!osd2"'