mirror of https://github.com/ceph/ceph-ansible.git
ansible: bump to ansible 2.12
Add required changes to support ansible 2.12 Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/7205/head
parent
4edaab5f4c
commit
aa68b06c99
|
@ -93,7 +93,9 @@ The ``main`` branch should be considered experimental and used with caution.
|
||||||
|
|
||||||
- ``stable-6.0`` Supports Ceph version ``pacific``. This branch requires Ansible version ``2.10``.
|
- ``stable-6.0`` Supports Ceph version ``pacific``. This branch requires Ansible version ``2.10``.
|
||||||
|
|
||||||
- ``main`` Supports the main 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.
|
.. NOTE:: ``stable-3.0`` and ``stable-3.1`` branches of ceph-ansible are deprecated and no longer maintained.
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@
|
||||||
when: item.1.stdout == 'ceph data'
|
when: item.1.stdout == 'ceph data'
|
||||||
|
|
||||||
- name: umount osd data
|
- name: umount osd data
|
||||||
mount:
|
ansible.posix.mount:
|
||||||
path: "/var/lib/ceph/osd/{{ cluster }}-{{ (item.0.stdout | from_json).whoami }}"
|
path: "/var/lib/ceph/osd/{{ cluster }}-{{ (item.0.stdout | from_json).whoami }}"
|
||||||
state: unmounted
|
state: unmounted
|
||||||
with_together:
|
with_together:
|
||||||
|
@ -147,7 +147,7 @@
|
||||||
when: item.1.stdout == 'ceph data'
|
when: item.1.stdout == 'ceph data'
|
||||||
|
|
||||||
- name: umount osd lockbox
|
- name: umount osd lockbox
|
||||||
mount:
|
ansible.posix.mount:
|
||||||
path: "/var/lib/ceph/osd-lockbox/{{ (item.0.stdout | from_json).data.uuid }}"
|
path: "/var/lib/ceph/osd-lockbox/{{ (item.0.stdout | from_json).data.uuid }}"
|
||||||
state: unmounted
|
state: unmounted
|
||||||
with_together:
|
with_together:
|
||||||
|
@ -441,4 +441,4 @@
|
||||||
"This node has been skipped because OSDs are either"
|
"This node has been skipped because OSDs are either"
|
||||||
"all bluestore or there's a mix of filestore and bluestore OSDs"
|
"all bluestore or there's a mix of filestore and bluestore OSDs"
|
||||||
when:
|
when:
|
||||||
- skip_this_node | bool
|
- skip_this_node | bool
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: tear down any existing osd filesystem
|
- name: tear down any existing osd filesystem
|
||||||
mount:
|
ansible.posix.mount:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: unmounted
|
state: unmounted
|
||||||
with_items: "{{ old_osd_filesystems.stdout_lines }}"
|
with_items: "{{ old_osd_filesystems.stdout_lines }}"
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
with_items: "{{ groups[nfs_group_name] }}"
|
with_items: "{{ groups[nfs_group_name] }}"
|
||||||
|
|
||||||
- name: ensure nfs-ganesha mountpoint(s) are unmounted
|
- name: ensure nfs-ganesha mountpoint(s) are unmounted
|
||||||
mount:
|
ansible.posix.mount:
|
||||||
path: "{{ item.split(' ')[1] }}"
|
path: "{{ item.split(' ')[1] }}"
|
||||||
state: unmounted
|
state: unmounted
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -434,7 +434,7 @@
|
||||||
- (containerized_deployment | bool or ceph_volume_present.rc == 0)
|
- (containerized_deployment | bool or ceph_volume_present.rc == 0)
|
||||||
|
|
||||||
- name: umount osd data partition
|
- name: umount osd data partition
|
||||||
mount:
|
ansible.posix.mount:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: unmounted
|
state: unmounted
|
||||||
with_items: "{{ mounted_osd.stdout_lines }}"
|
with_items: "{{ mounted_osd.stdout_lines }}"
|
||||||
|
@ -801,7 +801,7 @@
|
||||||
listen: "remove data"
|
listen: "remove data"
|
||||||
|
|
||||||
- name: umount osd data partition
|
- name: umount osd data partition
|
||||||
mount:
|
ansible.posix.mount:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: unmounted
|
state: unmounted
|
||||||
with_items: "{{ mounted_osd.stdout_lines }}"
|
with_items: "{{ mounted_osd.stdout_lines }}"
|
||||||
|
|
|
@ -161,7 +161,7 @@
|
||||||
delegate_to: "{{ item.0 }}"
|
delegate_to: "{{ item.0 }}"
|
||||||
|
|
||||||
- name: umount osd lockbox
|
- name: umount osd lockbox
|
||||||
mount:
|
ansible.posix.mount:
|
||||||
path: "/var/lib/ceph/osd-lockbox/{{ ceph_osd_data_json[item.2]['data']['uuid'] }}"
|
path: "/var/lib/ceph/osd-lockbox/{{ ceph_osd_data_json[item.2]['data']['uuid'] }}"
|
||||||
state: absent
|
state: absent
|
||||||
loop: "{{ _osd_hosts }}"
|
loop: "{{ _osd_hosts }}"
|
||||||
|
@ -173,7 +173,7 @@
|
||||||
- ceph_osd_data_json[item.2]['data']['uuid'] is defined
|
- ceph_osd_data_json[item.2]['data']['uuid'] is defined
|
||||||
|
|
||||||
- name: umount osd data
|
- name: umount osd data
|
||||||
mount:
|
ansible.posix.mount:
|
||||||
path: "/var/lib/ceph/osd/{{ cluster }}-{{ item.2 }}"
|
path: "/var/lib/ceph/osd/{{ cluster }}-{{ item.2 }}"
|
||||||
state: absent
|
state: absent
|
||||||
loop: "{{ _osd_hosts }}"
|
loop: "{{ _osd_hosts }}"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# These are Python requirements needed to run ceph-ansible main
|
# These are Python requirements needed to run ceph-ansible main
|
||||||
ansible>=2.10,<2.11,!=2.9.10
|
ansible-core>=2.12,<2.13
|
||||||
netaddr
|
netaddr
|
||||||
six
|
six
|
||||||
|
|
|
@ -5,3 +5,6 @@ collections:
|
||||||
version: 1.2.1
|
version: 1.2.1
|
||||||
type: git
|
type: git
|
||||||
- name: ansible.utils
|
- name: ansible.utils
|
||||||
|
version: '>=2.5.0'
|
||||||
|
- name: community.general
|
||||||
|
- name: ansible.posix
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
- name: fail on unsupported ansible version
|
- name: fail on unsupported ansible version
|
||||||
fail:
|
fail:
|
||||||
msg: "Ansible version must be 2.10!"
|
msg: "Ansible version must be 2.12!"
|
||||||
when: ansible_version.minor|int != 10
|
when: ansible_version.minor|int != 12
|
||||||
|
|
||||||
- name: fail on unsupported system
|
- name: fail on unsupported system
|
||||||
fail:
|
fail:
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
|
|
||||||
# mount -o remount doesn't work on RHEL 8 for now
|
# mount -o remount doesn't work on RHEL 8 for now
|
||||||
- name: add mount options to /
|
- name: add mount options to /
|
||||||
mount:
|
ansible.posix.mount:
|
||||||
path: '{{ rootmount.mount }}'
|
path: '{{ rootmount.mount }}'
|
||||||
src: '{{ rootmount.device }}'
|
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{% if ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] | int < 8 %},nobarrier{% endif %}"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
testinfra
|
testinfra
|
||||||
pytest-xdist
|
pytest-xdist
|
||||||
pytest
|
pytest
|
||||||
ansible>=2.10,<2.11,!=2.9.10
|
ansible-core>=2.12,<2.13,!=2.9.10
|
||||||
Jinja2>=2.10
|
Jinja2>=2.10
|
||||||
netaddr
|
netaddr
|
||||||
mock
|
mock
|
||||||
|
|
|
@ -40,6 +40,13 @@ commands=
|
||||||
|
|
||||||
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/setup.yml
|
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/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)
|
# configure lvm, we exclude osd2 given this node uses lvm batch scenario (see corresponding inventory host file)
|
||||||
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/lvm_setup.yml --limit 'osds:!osd2'
|
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/lvm_setup.yml --limit 'osds:!osd2'
|
||||||
|
|
||||||
|
@ -53,6 +60,10 @@ commands=
|
||||||
ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \
|
ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
# pip uninstall -y ansible
|
||||||
|
# pip install -r {toxinidir}/tests/requirements.txt
|
||||||
|
ansible-galaxy install -r {toxinidir}/requirements.yml -v
|
||||||
|
|
||||||
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/infrastructure-playbooks/rolling_update.yml --extra-vars "\
|
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/infrastructure-playbooks/rolling_update.yml --extra-vars "\
|
||||||
ireallymeanit=yes \
|
ireallymeanit=yes \
|
||||||
ceph_dev_branch={env:UPDATE_CEPH_DEV_BRANCH:main} \
|
ceph_dev_branch={env:UPDATE_CEPH_DEV_BRANCH:main} \
|
||||||
|
|
Loading…
Reference in New Issue