infrastructure-playbooks: drop add-osd playbook

This playbook isn't needed anymore, we can achieve this operation by
running main playbook with `--limit` option.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/5911/head
Guillaume Abrioux 2020-09-15 14:11:59 +02:00
parent bd611a785b
commit 20718582da
2 changed files with 1 additions and 164 deletions

View File

@ -1,146 +0,0 @@
---
# This playbook is used to add a new OSD to
# an existing cluster without the need for running
# the ceph-container-common or ceph-common and ceph-mon role again against all
# of the existing monitors.
#
# It can run from any machine. Even if the fetch directory is not present
# it will be created.
#
# Ensure that all monitors are present in the mons
# group in your inventory so that the ceph configuration file
# is created correctly for the new OSD(s).
#
# It is expected to edit your inventory file to only point to the OSD hosts
# you want to play the playbook on. So you need to comment already deployed OSD
# and let uncommented the new OSDs.
#
- hosts:
- mons
- osds
gather_facts: False
become: true
vars:
delegate_facts_host: True
pre_tasks:
- import_tasks: "{{ playbook_dir }}/../raw_install_python.yml"
- name: gather facts
setup:
gather_subset:
- 'all'
- '!facter'
- '!ohai'
when: not delegate_facts_host | bool
- import_role:
name: ceph-defaults
- name: gather and delegate facts
setup:
gather_subset:
- 'all'
- '!facter'
- '!ohai'
delegate_to: "{{ item }}"
delegate_facts: True
with_items:
- "{{ groups[mon_group_name] }}"
- "{{ groups[osd_group_name] }}"
run_once: True
when: delegate_facts_host | bool
tasks:
- import_role:
name: ceph-facts
- import_role:
name: ceph-validate
- hosts: osds
gather_facts: False
become: True
vars:
delegate_facts_host: True
pre_tasks:
- name: gather facts
setup:
gather_subset:
- 'all'
- '!facter'
- '!ohai'
when: not delegate_facts_host | bool
- import_role:
name: ceph-defaults
- name: gather and delegate facts
setup:
gather_subset:
- 'all'
- '!facter'
- '!ohai'
delegate_to: "{{ item }}"
delegate_facts: True
with_items:
- "{{ groups[mon_group_name] }}"
- "{{ groups[osd_group_name] }}"
run_once: True
when: delegate_facts_host | bool
- import_role:
name: ceph-facts
- import_role:
name: ceph-handler
- import_role:
name: ceph-infra
- import_role:
name: ceph-container-engine
when: containerized_deployment | bool
- import_role:
name: ceph-container-common
when: containerized_deployment | bool
- import_role:
name: ceph-common
when: not containerized_deployment | bool
# this task is needed so we can skip the openstack_config.yml include in roles/ceph-osd
- name: set_fact add_osd
set_fact:
add_osd: True
- name: set noup flag
command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd set noup"
delegate_to: "{{ groups['mons'][0] }}"
run_once: True
changed_when: False
tasks:
- import_role:
name: ceph-facts
- import_role:
name: ceph-handler
- import_role:
name: ceph-config
- import_role:
name: ceph-osd
post_tasks:
- name: unset noup flag
command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd unset noup"
delegate_to: "{{ groups['mons'][0] }}"
run_once: True
changed_when: False
- name: warn user about deprecation
debug:
msg: |
Playbook has complete.
However, note that it will be deprecated in a future release.
You can achieve the same goal using the main playbook with --limit

19
tox.ini
View File

@ -1,5 +1,5 @@
[tox] [tox]
envlist = centos-{container,non_container}-{all_daemons,collocation,lvm_osds,shrink_mon,shrink_osd,shrink_mgr,shrink_mds,shrink_rbdmirror,shrink_rgw,lvm_batch,add_mons,add_osds,add_mgrs,add_mdss,add_rbdmirrors,add_rgws,rgw_multisite,purge,storage_inventory,lvm_auto_discovery,all_in_one,cephadm_adopt} envlist = centos-{container,non_container}-{all_daemons,collocation,lvm_osds,shrink_mon,shrink_osd,shrink_mgr,shrink_mds,shrink_rbdmirror,shrink_rgw,lvm_batch,add_mons,add_mgrs,add_mdss,add_rbdmirrors,add_rgws,rgw_multisite,purge,storage_inventory,lvm_auto_discovery,all_in_one,cephadm_adopt}
centos-non_container-{switch_to_containers} centos-non_container-{switch_to_containers}
infra_lv_create infra_lv_create
migrate_ceph_disk_to_ceph_volume migrate_ceph_disk_to_ceph_volume
@ -161,21 +161,6 @@ commands=
" "
py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-2 --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-2 --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests
[add-osds]
commands=
ansible-playbook -vv -i {changedir}/hosts-2 --limit osd1 {toxinidir}/tests/functional/setup.yml
ansible-playbook -vv -i {changedir}/hosts-2 --limit osd1 {toxinidir}/tests/functional/lvm_setup.yml
ansible-playbook -vv -i {changedir}/hosts-2 --limit osd1 {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars "\
ireallymeanit=yes \
fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \
ceph_dev_branch={env:CEPH_DEV_BRANCH:master} \
ceph_dev_sha1={env:CEPH_DEV_SHA1:latest} \
ceph_docker_registry_auth=True \
ceph_docker_registry_username={env:DOCKER_HUB_USERNAME} \
ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \
"
py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-2 --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests
[add-mgrs] [add-mgrs]
commands= commands=
ansible-playbook -vv -i {changedir}/hosts-2 --limit mgrs {toxinidir}/tests/functional/setup.yml ansible-playbook -vv -i {changedir}/hosts-2 --limit mgrs {toxinidir}/tests/functional/setup.yml
@ -329,7 +314,6 @@ changedir=
lvm_osds: {toxinidir}/tests/functional/lvm-osds{env:CONTAINER_DIR:} lvm_osds: {toxinidir}/tests/functional/lvm-osds{env:CONTAINER_DIR:}
lvm_batch: {toxinidir}/tests/functional/lvm-batch{env:CONTAINER_DIR:} lvm_batch: {toxinidir}/tests/functional/lvm-batch{env:CONTAINER_DIR:}
add_mons: {toxinidir}/tests/functional/add-mons{env:CONTAINER_DIR:} add_mons: {toxinidir}/tests/functional/add-mons{env:CONTAINER_DIR:}
add_osds: {toxinidir}/tests/functional/add-osds{env:CONTAINER_DIR:}
add_mgrs: {toxinidir}/tests/functional/add-mgrs{env:CONTAINER_DIR:} add_mgrs: {toxinidir}/tests/functional/add-mgrs{env:CONTAINER_DIR:}
add_mdss: {toxinidir}/tests/functional/add-mdss{env:CONTAINER_DIR:} add_mdss: {toxinidir}/tests/functional/add-mdss{env:CONTAINER_DIR:}
add_rbdmirrors: {toxinidir}/tests/functional/add-rbdmirrors{env:CONTAINER_DIR:} add_rbdmirrors: {toxinidir}/tests/functional/add-rbdmirrors{env:CONTAINER_DIR:}
@ -382,7 +366,6 @@ commands=
shrink_mds: {[shrink-mds]commands} shrink_mds: {[shrink-mds]commands}
shrink_rbdmirror: {[shrink-rbdmirror]commands} shrink_rbdmirror: {[shrink-rbdmirror]commands}
shrink_rgw: {[shrink-rgw]commands} shrink_rgw: {[shrink-rgw]commands}
add_osds: {[add-osds]commands}
add_mons: {[add-mons]commands} add_mons: {[add-mons]commands}
add_mgrs: {[add-mgrs]commands} add_mgrs: {[add-mgrs]commands}
add_mdss: {[add-mdss]commands} add_mdss: {[add-mdss]commands}