diff options
Diffstat (limited to 'ansible/roles/ceph/tasks')
| -rw-r--r-- | ansible/roles/ceph/tasks/bootstrap_mons.yml | 38 | ||||
| -rw-r--r-- | ansible/roles/ceph/tasks/bootstrap_osds.yml | 117 | ||||
| -rw-r--r-- | ansible/roles/ceph/tasks/config.yml | 33 | ||||
| -rw-r--r-- | ansible/roles/ceph/tasks/deploy.yml | 21 | ||||
| -rw-r--r-- | ansible/roles/ceph/tasks/distribute_keyrings.yml | 46 | ||||
| -rw-r--r-- | ansible/roles/ceph/tasks/generate_cluster.yml | 28 | ||||
| -rw-r--r-- | ansible/roles/ceph/tasks/main.yml | 2 | ||||
| -rw-r--r-- | ansible/roles/ceph/tasks/precheck.yml | 1 | ||||
| -rw-r--r-- | ansible/roles/ceph/tasks/pull.yml | 21 | ||||
| -rw-r--r-- | ansible/roles/ceph/tasks/reconfigure.yml | 214 | ||||
| -rw-r--r-- | ansible/roles/ceph/tasks/start_mons.yml | 16 | ||||
| -rw-r--r-- | ansible/roles/ceph/tasks/start_osds.yml | 51 | ||||
| -rw-r--r-- | ansible/roles/ceph/tasks/start_rgws.yml | 11 | ||||
| -rw-r--r-- | ansible/roles/ceph/tasks/upgrade.yml | 13 |
14 files changed, 0 insertions, 612 deletions
diff --git a/ansible/roles/ceph/tasks/bootstrap_mons.yml b/ansible/roles/ceph/tasks/bootstrap_mons.yml deleted file mode 100644 index a5ec39d4c..000000000 --- a/ansible/roles/ceph/tasks/bootstrap_mons.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -- name: Cleaning up temp file on localhost - local_action: file path=/tmp/kolla_ceph_cluster state=absent - changed_when: False - check_mode: no - run_once: True - -- name: Creating temp file on localhost - local_action: copy content=None dest=/tmp/kolla_ceph_cluster mode=0644 - changed_when: False - check_mode: no - run_once: True - -- name: Creating ceph_mon_config volume - kolla_docker: - action: "create_volume" - common_options: "{{ docker_common_options }}" - name: "ceph_mon_config" - register: ceph_mon_config_volume - -- name: Writing hostname of host with existing cluster files to temp file - local_action: copy content="{{ inventory_hostname }}" dest=/tmp/kolla_ceph_cluster mode=0644 - changed_when: False - check_mode: no - when: not ceph_mon_config_volume.changed - -- name: Registering host from temp file - set_fact: - delegate_host: "{{ lookup('file', '/tmp/kolla_ceph_cluster') }}" - -- name: Cleaning up temp file on localhost - local_action: file path=/tmp/kolla_ceph_cluster state=absent - changed_when: False - check_mode: no - run_once: True - -- include: generate_cluster.yml - when: delegate_host == 'None' and inventory_hostname == groups['ceph-mon'][0] diff --git a/ansible/roles/ceph/tasks/bootstrap_osds.yml b/ansible/roles/ceph/tasks/bootstrap_osds.yml deleted file mode 100644 index e5d0ab8b0..000000000 --- a/ansible/roles/ceph/tasks/bootstrap_osds.yml +++ /dev/null @@ -1,117 +0,0 @@ ---- -- name: Looking up disks to bootstrap for Ceph OSDs - command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost - -m find_disks - -a "partition_name='KOLLA_CEPH_OSD_BOOTSTRAP' match_mode='prefix'" - register: osd_lookup - changed_when: "{{ osd_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - failed_when: osd_lookup.stdout.split()[2] != 'SUCCESS' - -- name: Parsing disk info for Ceph OSDs - set_fact: - osds_bootstrap: "{{ (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).disks|from_json }}" - -- name: Looking up disks to bootstrap for Ceph Cache OSDs - command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost - -m find_disks - -a "partition_name='KOLLA_CEPH_OSD_CACHE_BOOTSTRAP' match_mode='prefix'" - register: osd_cache_lookup - changed_when: "{{ osd_cache_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_cache_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - failed_when: osd_cache_lookup.stdout.split()[2] != 'SUCCESS' - -- name: Parsing disk info for Ceph Cache OSDs - set_fact: - osds_cache_bootstrap: "{{ (osd_cache_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).disks|from_json }}" - -- pause: - prompt: | - WARNING: It seems {{ item.device }} is marked to be wiped and partitioned for Ceph data and - a co-located journal, but appears to contain other existing partitions (>1). - - If you are sure you want this disk to be *wiped* for use with Ceph, press enter. - - Otherwise, press Ctrl-C, then 'A'. (You can disable this check by setting - ceph_osd_wipe_disk: 'yes-i-really-really-mean-it' within globals.yml) - with_items: "{{ osds_bootstrap|default([]) }}" - when: - - item.external_journal | bool == False - - ansible_devices[item.device.split('/')[2]].partitions|count > 1 - - ceph_osd_wipe_disk != "yes-i-really-really-mean-it" - -- name: Bootstrapping Ceph OSDs - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - detach: False - environment: - KOLLA_BOOTSTRAP: - KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" - OSD_DEV: "{{ item.1.device }}" - OSD_PARTITION: "{{ item.1.partition }}" - OSD_PARTITION_NUM: "{{ item.1.partition_num }}" - JOURNAL_DEV: "{{ item.1.journal_device }}" - JOURNAL_PARTITION: "{{ item.1.journal }}" - JOURNAL_PARTITION_NUM: "{{ item.1.journal_num }}" - USE_EXTERNAL_JOURNAL: "{{ item.1.external_journal | bool }}" - OSD_FILESYSTEM: "{{ ceph_osd_filesystem }}" - OSD_INITIAL_WEIGHT: "{{ osd_initial_weight }}" - HOSTNAME: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}" - image: "{{ ceph_osd_image_full }}" - labels: - BOOTSTRAP: - name: "bootstrap_osd_{{ item.0 }}" - privileged: True - restart_policy: "never" - volumes: - - "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "/dev/:/dev/" - - "kolla_logs:/var/log/kolla/" - with_indexed_items: "{{ osds_bootstrap|default([]) }}" - -- pause: - prompt: | - WARNING: It seems {{ item.device }} is marked to be wiped and partitioned for Ceph data and - a co-located journal, but appears to contain other existing partitions (>1). - - If you are sure you want this disk to be *wiped* for use with Ceph, press enter. - - Otherwise, press Ctrl-C, then 'A'. (You can disable this check by setting - ceph_osd_wipe_disk: 'yes-i-really-really-mean-it' within globals.yml) - with_items: "{{ osds_cache_bootstrap|default([]) }}" - when: - - item.external_journal | bool == False - - ansible_devices[item.device.split('/')[2]].partitions|count > 1 - - ceph_osd_wipe_disk != "yes-i-really-really-mean-it" - -- name: Bootstrapping Ceph Cache OSDs - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - detach: False - environment: - KOLLA_BOOTSTRAP: - KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" - CEPH_CACHE: - OSD_DEV: "{{ item.1.device }}" - OSD_PARTITION: "{{ item.1.partition }}" - OSD_PARTITION_NUM: "{{ item.1.partition_num }}" - JOURNAL_DEV: "{{ item.1.journal_device }}" - JOURNAL_PARTITION: "{{ item.1.journal }}" - JOURNAL_PARTITION_NUM: "{{ item.1.journal_num }}" - USE_EXTERNAL_JOURNAL: "{{ item.1.external_journal | bool }}" - OSD_FILESYSTEM: "{{ ceph_osd_filesystem }}" - OSD_INITIAL_WEIGHT: "{{ osd_initial_weight }}" - HOSTNAME: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}" - image: "{{ ceph_osd_image_full }}" - labels: - BOOTSTRAP: - name: "bootstrap_osd_cache_{{ item.0 }}" - privileged: True - restart_policy: "never" - volumes: - - "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "/dev/:/dev/" - - "kolla_logs:/var/log/kolla/" - with_indexed_items: "{{ osds_cache_bootstrap|default([]) }}" diff --git a/ansible/roles/ceph/tasks/config.yml b/ansible/roles/ceph/tasks/config.yml deleted file mode 100644 index d88e9645d..000000000 --- a/ansible/roles/ceph/tasks/config.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -- name: Ensuring config directories exist - file: - path: "{{ node_config_directory }}/{{ item }}" - state: "directory" - recurse: yes - with_items: - - "ceph-mon" - - "ceph-osd" - - "ceph-rgw" - -- name: Copying over config.json files for services - template: - src: "{{ item }}.json.j2" - dest: "{{ node_config_directory }}/{{ item }}/config.json" - with_items: - - "ceph-mon" - - "ceph-osd" - - "ceph-rgw" - -- name: Copying over ceph.conf - merge_configs: - vars: - service_name: "{{ item }}" - sources: - - "{{ role_path }}/templates/ceph.conf.j2" - - "{{ node_custom_config }}/ceph.conf" - - "{{ node_custom_config }}/ceph/{{ inventory_hostname }}/ceph.conf" - dest: "{{ node_config_directory }}/{{ item }}/ceph.conf" - with_items: - - "ceph-mon" - - "ceph-osd" - - "ceph-rgw" diff --git a/ansible/roles/ceph/tasks/deploy.yml b/ansible/roles/ceph/tasks/deploy.yml deleted file mode 100644 index 403265af7..000000000 --- a/ansible/roles/ceph/tasks/deploy.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -- include: config.yml - -- include: bootstrap_mons.yml - when: inventory_hostname in groups['ceph-mon'] - -- include: distribute_keyrings.yml - -- include: start_mons.yml - when: inventory_hostname in groups['ceph-mon'] - -- include: bootstrap_osds.yml - when: inventory_hostname in groups['ceph-osd'] - -- include: start_osds.yml - when: inventory_hostname in groups['ceph-osd'] - -- include: start_rgws.yml - when: - - inventory_hostname in groups['ceph-rgw'] - - enable_ceph_rgw | bool diff --git a/ansible/roles/ceph/tasks/distribute_keyrings.yml b/ansible/roles/ceph/tasks/distribute_keyrings.yml deleted file mode 100644 index ea4952a42..000000000 --- a/ansible/roles/ceph/tasks/distribute_keyrings.yml +++ /dev/null @@ -1,46 +0,0 @@ ---- -- name: Fetching Ceph keyrings - command: docker exec ceph_mon fetch_ceph_keys.py - register: ceph_files_json - changed_when: "{{ (ceph_files_json.stdout | from_json).changed }}" - failed_when: "{{ (ceph_files_json.stdout | from_json).failed }}" - delegate_to: "{{ delegate_host }}" - run_once: True - -- name: Reading json from variable - set_fact: - ceph_files: "{{ (ceph_files_json.stdout | from_json) }}" - -- name: Pushing Ceph keyring for OSDs - bslurp: - src: "{{ item.content }}" - dest: "{{ node_config_directory }}/ceph-osd/{{ item.filename }}" - mode: 0600 - sha1: "{{ item.sha1 }}" - with_items: - - "{{ ceph_files['ceph.client.admin.keyring'] }}" - when: inventory_hostname in groups['ceph-osd'] - -- name: Pushing Ceph keyrings for Mons - bslurp: - src: "{{ item.content }}" - dest: "{{ node_config_directory }}/ceph-mon/{{ item.filename }}" - mode: 0600 - sha1: "{{ item.sha1 }}" - with_items: - - "{{ ceph_files['ceph.client.admin.keyring'] }}" - - "{{ ceph_files['ceph.client.mon.keyring'] }}" - - "{{ ceph_files['ceph.client.radosgw.keyring'] }}" - - "{{ ceph_files['ceph.monmap'] }}" - when: inventory_hostname in groups['ceph-mon'] - -- name: Pushing Ceph keyrings for RGWs - bslurp: - src: "{{ item.content }}" - dest: "{{ node_config_directory }}/ceph-rgw/{{ item.filename }}" - mode: 0600 - sha1: "{{ item.sha1 }}" - with_items: - - "{{ ceph_files['ceph.client.admin.keyring'] }}" - - "{{ ceph_files['ceph.client.radosgw.keyring'] }}" - when: inventory_hostname in groups['ceph-rgw'] diff --git a/ansible/roles/ceph/tasks/generate_cluster.yml b/ansible/roles/ceph/tasks/generate_cluster.yml deleted file mode 100644 index beb78e587..000000000 --- a/ansible/roles/ceph/tasks/generate_cluster.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -- name: Generating initial Ceph keyrings and monmap - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - detach: False - environment: - KOLLA_BOOTSTRAP: - KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" - MON_IP: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}" - HOSTNAME: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}" - image: "{{ ceph_mon_image_full }}" - labels: - BOOTSTRAP: - name: "bootstrap_ceph_mon" - restart_policy: "never" - volumes: - - "{{ node_config_directory }}/ceph-mon/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "ceph_mon:/var/lib/ceph" - - "ceph_mon_config:/etc/ceph" - - "kolla_logs:/var/log/kolla/" - -- include: start_mons.yml - -- name: Setting host for cluster files - set_fact: - delegate_host: "{{ inventory_hostname }}" diff --git a/ansible/roles/ceph/tasks/main.yml b/ansible/roles/ceph/tasks/main.yml deleted file mode 100644 index b017e8b4a..000000000 --- a/ansible/roles/ceph/tasks/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- include: "{{ action }}.yml" diff --git a/ansible/roles/ceph/tasks/precheck.yml b/ansible/roles/ceph/tasks/precheck.yml deleted file mode 100644 index ed97d539c..000000000 --- a/ansible/roles/ceph/tasks/precheck.yml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/ansible/roles/ceph/tasks/pull.yml b/ansible/roles/ceph/tasks/pull.yml deleted file mode 100644 index fde080f96..000000000 --- a/ansible/roles/ceph/tasks/pull.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -- name: Pulling ceph-mon image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ ceph_mon_image_full }}" - when: inventory_hostname in groups['ceph-mon'] - -- name: Pulling ceph-osd image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ ceph_osd_image_full }}" - when: inventory_hostname in groups['ceph-osd'] - -- name: Pulling ceph-rgw image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ ceph_rgw_image_full }}" - when: inventory_hostname in groups['ceph-rgw'] diff --git a/ansible/roles/ceph/tasks/reconfigure.yml b/ansible/roles/ceph/tasks/reconfigure.yml deleted file mode 100644 index ee7a78779..000000000 --- a/ansible/roles/ceph/tasks/reconfigure.yml +++ /dev/null @@ -1,214 +0,0 @@ ---- -- name: Ensuring the ceph_mon container is up - kolla_docker: - name: "{{ item.name }}" - action: "get_container_state" - register: ceph_mon_container_state - failed_when: container_state.Running == false - when: inventory_hostname in groups[item.group] - with_items: - - { name: ceph_mon, group: ceph-mon } - -- name: Looking up OSDs for Ceph - command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost - -m find_disks - -a "partition_name='KOLLA_CEPH_DATA' match_mode='prefix'" - register: osd_lookup - changed_when: "{{ osd_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - failed_when: osd_lookup.stdout.split()[2] != 'SUCCESS' - when: inventory_hostname in groups['ceph-osd'] - -- name: Reading data from variable - set_fact: - osds: "{{ (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).disks|from_json }}" - when: inventory_hostname in groups['ceph-osd'] - -- name: Gathering OSD IDs - command: "cat /var/lib/ceph/osd/{{ item['fs_uuid'] }}/whoami" - with_items: "{{ osds }}" - register: osd_ids - changed_when: False - failed_when: osd_ids.rc != 0 - when: inventory_hostname in groups['ceph-osd'] - -- name: Ensuring the ceph_osd container is up - kolla_docker: - name: "ceph_osd_{{ item.stdout }}" - action: "get_container_state" - register: ceph_osd_container_state - failed_when: ceph_osd_container_state.Running == false - when: inventory_hostname in groups['ceph-osd'] - with_items: "{{ osd_ids.results }}" - -- name: Ensuring the ceph_rgw container is up - kolla_docker: - name: "{{ item.name }}" - action: "get_container_state" - register: ceph_rgw_container_state - failed_when: container_state.Running == false - when: - - enable_ceph_rgw | bool - - inventory_hostname in groups[item.group] - with_items: - - { name: ceph_rgw, group: ceph-rgw } - -- include: config.yml - -- name: Check the configs in ceph_mon container - command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check - changed_when: false - failed_when: false - register: ceph_mon_check_results - when: inventory_hostname in groups[item.group] - with_items: - - { name: ceph_mon, group: ceph-mon } - -- name: Check the configs in the ceph_osd container - command: docker exec ceph_osd_{{ item.stdout }} /usr/local/bin/kolla_set_configs --check - changed_when: false - failed_when: false - register: ceph_osd_check_results - with_items: "{{ osd_ids.results }}" - when: inventory_hostname in groups['ceph-osd'] - -- name: Check the configs in ceph_rgw container - command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check - changed_when: false - failed_when: false - register: ceph_rgw_check_results - when: - - inventory_hostname in groups[item.group] - - enable_ceph_rgw | bool - with_items: - - { name: ceph_rgw, group: ceph-rgw} - -- name: Containers config strategy for ceph_mon container - kolla_docker: - name: "{{ item.name }}" - action: "get_container_env" - register: ceph_mon_container_envs - when: inventory_hostname in groups[item.group] - with_items: - - { name: ceph_mon, group: ceph-mon } - -- name: Containers config strategy for the ceph_osd containers - kolla_docker: - name: "ceph_osd_{{ item.stdout }}" - action: "get_container_env" - register: ceph_osd_container_envs - with_items: "{{ osd_ids.results }}" - when: - - inventory_hostname in groups['ceph-osd'] - - osds - -- name: Containers config strategy for ceph_rgw container - kolla_docker: - name: "{{ item.name }}" - action: "get_container_env" - register: ceph_rgw_container_envs - when: - - inventory_hostname in groups[item.group] - - enable_ceph_rgw | bool - with_items: - - { name: ceph_rgw, group: ceph-rgw } - -- name: Remove the ceph_mon container - kolla_docker: - name: "{{ item[0]['name'] }}" - action: "remove_container" - register: remove_ceph_mon_container - when: - - inventory_hostname in groups[item[0]['group']] - - config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE' - - item[2]['rc'] == 1 - with_together: - - [{ name: ceph_mon, group: ceph-mon }] - - "{{ ceph_mon_container_envs.results }}" - - "{{ ceph_mon_check_results.results }}" - -- name: Remove the ceph_osd containers - kolla_docker: - name: "ceph_osd_{{ item.0.stdout }}" - action: "remove_container" - register: remove_ceph_osd_containers - when: - - inventory_hostname in groups['ceph-osd'] - - config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE' - - item[2]['rc'] == 1 - - osds - with_together: - - "{{ osd_ids.results }}" - - "{{ ceph_osd_container_envs.results }}" - - "{{ ceph_osd_check_results.results }}" - -- name: Remove the ceph_rgw container - kolla_docker: - name: "{{ item[0]['name'] }}" - action: "remove_container" - register: remove_ceph_rgw_container - when: - - enable_ceph_rgw | bool - - inventory_hostname in groups[item[0]['group']] - - config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE' - - item[2]['rc'] == 1 - with_together: - - [{ name: ceph_rgw, group: ceph-rgw }] - - "{{ ceph_rgw_container_envs.results }}" - - "{{ ceph_rgw_check_results.results }}" - -- include: start_mons.yml - when: - - inventory_hostname in groups['ceph-mon'] - - remove_ceph_mon_container.changed - -- include: start_osds.yml - when: - - inventory_hostname in groups['ceph-osd'] - - remove_ceph_osd_containers.changed - -- include: start_rgws.yml - when: - - inventory_hostname in groups['ceph-rgw'] - - remove_ceph_rgw_container.changed - -- name: Restart the ceph_mon container - kolla_docker: - name: "ceph_mon" - action: "restart_container" - when: - - inventory_hostname in groups['ceph-mon'] - - config_strategy == 'COPY_ALWAYS' - - item[0]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE' - - item[1]['rc'] == 1 - with_together: - - "{{ ceph_mon_container_envs.results }}" - - "{{ ceph_mon_check_results.results }}" - -- name: Restart the ceph_osd container - kolla_docker: - name: "ceph_osd_{{ item.0.stdout }}" - action: "restart_container" - when: - - inventory_hostname in groups['ceph-osd'] - - config_strategy == 'COPY_ALWAYS' - - item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE' - - item[2]['rc'] == 1 - - osds - with_together: - - "{{ osd_ids.results }}" - - "{{ ceph_osd_container_envs.results }}" - - "{{ ceph_osd_check_results.results }}" - -- name: Restart the ceph_rgw container - kolla_docker: - name: "ceph_rgw" - action: "restart_container" - when: - - enable_ceph_rgw | bool - - inventory_hostname in groups['ceph-rgw'] - - config_strategy == 'COPY_ALWAYS' - - item[0]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE' - - item[1]['rc'] == 1 - with_together: - - "{{ ceph_rgw_container_envs.results }}" - - "{{ ceph_rgw_check_results.results }}" diff --git a/ansible/roles/ceph/tasks/start_mons.yml b/ansible/roles/ceph/tasks/start_mons.yml deleted file mode 100644 index ccc2467bf..000000000 --- a/ansible/roles/ceph/tasks/start_mons.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- name: Starting ceph-mon container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - environment: - KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" - HOSTNAME: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}" - image: "{{ ceph_mon_image_full }}" - name: "ceph_mon" - volumes: - - "{{ node_config_directory }}/ceph-mon/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "ceph_mon:/var/lib/ceph" - - "ceph_mon_config:/etc/ceph" - - "kolla_logs:/var/log/kolla/" diff --git a/ansible/roles/ceph/tasks/start_osds.yml b/ansible/roles/ceph/tasks/start_osds.yml deleted file mode 100644 index b5d642987..000000000 --- a/ansible/roles/ceph/tasks/start_osds.yml +++ /dev/null @@ -1,51 +0,0 @@ ---- -- name: Looking up OSDs for Ceph - command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost - -m find_disks - -a "partition_name='KOLLA_CEPH_DATA' match_mode='prefix'" - register: osd_lookup - changed_when: "{{ osd_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - failed_when: osd_lookup.stdout.split()[2] != 'SUCCESS' - -- name: Parsing disk info for Ceph OSDs - set_fact: - osds: "{{ (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).disks|from_json }}" - -- name: Mounting Ceph OSD volumes - mount: - src: "UUID={{ item.fs_uuid }}" - fstype: "{{ ceph_osd_filesystem }}" - state: mounted - name: "/var/lib/ceph/osd/{{ item['fs_uuid'] }}" - opts: "{{ ceph_osd_mount_options }}" - with_items: "{{ osds }}" - -- name: Gathering OSD IDs - command: "cat /var/lib/ceph/osd/{{ item['fs_uuid'] }}/whoami" - with_items: "{{ osds }}" - register: id - changed_when: False - failed_when: id.rc != 0 - -- name: Starting ceph-osd container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - environment: - KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" - OSD_ID: "{{ item.0.stdout }}" - JOURNAL_PARTITION: "{{ item.1.journal }}" - image: "{{ ceph_osd_image_full }}" - name: "ceph_osd_{{ item.0.stdout }}" - pid_mode: "host" - privileged: True - volumes: - - "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "/dev/:/dev/" - - "/var/lib/ceph/osd/{{ item.1['fs_uuid'] }}:/var/lib/ceph/osd/ceph-{{ item.0.stdout }}" - - "kolla_logs:/var/log/kolla/" - with_together: - - "{{ id.results }}" - - "{{ osds }}" - when: osds diff --git a/ansible/roles/ceph/tasks/start_rgws.yml b/ansible/roles/ceph/tasks/start_rgws.yml deleted file mode 100644 index 22ad1d213..000000000 --- a/ansible/roles/ceph/tasks/start_rgws.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -- name: Starting ceph-rgw container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ ceph_rgw_image_full }}" - name: "ceph_rgw" - volumes: - - "{{ node_config_directory }}/ceph-rgw/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "kolla_logs:/var/log/kolla/" diff --git a/ansible/roles/ceph/tasks/upgrade.yml b/ansible/roles/ceph/tasks/upgrade.yml deleted file mode 100644 index bf1c4ffde..000000000 --- a/ansible/roles/ceph/tasks/upgrade.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- include: config.yml - -- include: start_mons.yml - when: inventory_hostname in groups['ceph-mon'] - -- include: start_osds.yml - when: inventory_hostname in groups['ceph-osd'] - -- include: start_rgws.yml - when: - - inventory_hostname in groups['ceph-rgw'] - - enable_ceph_rgw | bool |
