mirror of https://github.com/ceph/ceph-ansible.git
Fixed quotes and removed combined_ prefix from variables that no longer need it
parent
5f61ff7867
commit
35a26068ef
|
@ -16,8 +16,8 @@
|
||||||
- name: activate osd(s) when device is a disk
|
- name: activate osd(s) when device is a disk
|
||||||
command: ceph-disk activate {{ item.1 | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\\1p') }}1
|
command: ceph-disk activate {{ item.1 | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\\1p') }}1
|
||||||
with_together:
|
with_together:
|
||||||
- combined_ispartition_results.results
|
- "{{ ispartition_results.results }}"
|
||||||
- devices
|
- "{{ devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: activate_osd_disk
|
register: activate_osd_disk
|
||||||
|
@ -41,8 +41,8 @@
|
||||||
- name: activate osd(s) when device is a disk (dmcrypt)
|
- name: activate osd(s) when device is a disk (dmcrypt)
|
||||||
command: ceph-disk activate --dmcrypt {{ item.1 | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\\1p') }}1
|
command: ceph-disk activate --dmcrypt {{ item.1 | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\\1p') }}1
|
||||||
with_together:
|
with_together:
|
||||||
- combined_ispartition_results.results
|
- "{{ ispartition_results.results }}"
|
||||||
- devices
|
- "{{ devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: activate_osd_disk_dmcrypt
|
register: activate_osd_disk_dmcrypt
|
||||||
|
@ -69,8 +69,8 @@
|
||||||
- name: activate osd(s) when device is a partition
|
- name: activate osd(s) when device is a partition
|
||||||
command: "ceph-disk activate {{ item.1 }}"
|
command: "ceph-disk activate {{ item.1 }}"
|
||||||
with_together:
|
with_together:
|
||||||
- combined_ispartition_results.results
|
- "{{ ispartition_results.results }}"
|
||||||
- devices
|
- "{{ devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
when:
|
when:
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
command: systemctl enable ceph-osd@{{ item }}
|
command: systemctl enable ceph-osd@{{ item }}
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
with_items: osd_id.stdout_lines
|
with_items: "{{ osd_id.stdout_lines }}"
|
||||||
when:
|
when:
|
||||||
- use_systemd
|
- use_systemd
|
||||||
- is_after_hammer
|
- is_after_hammer
|
||||||
|
@ -123,7 +123,7 @@
|
||||||
name: ceph-osd@{{ item }}
|
name: ceph-osd@{{ item }}
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
with_items: osd_id.stdout_lines
|
with_items: "{{ osd_id.stdout_lines }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- use_systemd
|
- use_systemd
|
||||||
|
|
|
@ -12,13 +12,17 @@
|
||||||
|
|
||||||
- include: ./check_devices_static.yml
|
- include: ./check_devices_static.yml
|
||||||
when: not osd_auto_discovery
|
when: not osd_auto_discovery
|
||||||
|
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
|
||||||
|
static: False
|
||||||
|
|
||||||
- include: ./check_devices_auto.yml
|
- include: ./check_devices_auto.yml
|
||||||
when: osd_auto_discovery
|
when: osd_auto_discovery
|
||||||
|
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
|
||||||
|
static: False
|
||||||
|
|
||||||
- name: check the partition status of the journal devices
|
- name: check the partition status of the journal devices
|
||||||
shell: "parted --script {{ item }} print > /dev/null 2>&1"
|
shell: "parted --script {{ item }} print > /dev/null 2>&1"
|
||||||
with_items: '{{ raw_journal_devices }}'
|
with_items: "{{ raw_journal_devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: journal_partition_status
|
register: journal_partition_status
|
||||||
|
@ -27,8 +31,8 @@
|
||||||
- name: fix partitions gpt header or labels of the journal devices
|
- name: fix partitions gpt header or labels of the journal devices
|
||||||
shell: "sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }} || sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }}"
|
shell: "sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }} || sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }}"
|
||||||
with_together:
|
with_together:
|
||||||
- '{{ journal_partition_status.results }}'
|
- "{{ journal_partition_status.results }}"
|
||||||
- '{{ raw_journal_devices }}'
|
- "{{ raw_journal_devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- raw_multi_journal
|
- raw_multi_journal
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
---
|
---
|
||||||
- name: check if the device is a partition (autodiscover disks)
|
- name: check if the device is a partition (autodiscover disks)
|
||||||
shell: "echo '/dev/{{ item.key }}' | egrep '/dev/([hsv]d[a-z]{1,2}|cciss/c[0-9]d[0-9]p|nvme[0-9]n[0-9]p)[0-9]{1,2}$'"
|
shell: "echo '/dev/{{ item.key }}' | egrep '/dev/([hsv]d[a-z]{1,2}|cciss/c[0-9]d[0-9]p|nvme[0-9]n[0-9]p)[0-9]{1,2}$'"
|
||||||
with_dict: '{{ ansible_devices }}'
|
with_dict: "{{ ansible_devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: '{{ combined_ispartition_results }}'
|
register: "{{ ispartition_results }}"
|
||||||
when:
|
when:
|
||||||
- ansible_devices is defined
|
- ansible_devices is defined
|
||||||
- item.value.removable == "0"
|
- item.value.removable == "0"
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
with_dict: '{{ ansible_devices }}'
|
with_dict: '{{ ansible_devices }}'
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: combined_osd_partition_status_results
|
register: osd_partition_status_results
|
||||||
when:
|
when:
|
||||||
- journal_collocation or raw_multi_journal
|
- journal_collocation or raw_multi_journal
|
||||||
- ansible_devices is defined
|
- ansible_devices is defined
|
||||||
|
@ -24,8 +24,8 @@
|
||||||
- name: fix partitions gpt header or labels of the osd disks (autodiscover disks)
|
- name: fix partitions gpt header or labels of the osd disks (autodiscover disks)
|
||||||
shell: "sgdisk --zap-all --clear --mbrtogpt -- '/dev/{{ item.0.item.key }}' || sgdisk --zap-all --clear --mbrtogpt -- '/dev/{{ item.0.item.key }}'"
|
shell: "sgdisk --zap-all --clear --mbrtogpt -- '/dev/{{ item.0.item.key }}' || sgdisk --zap-all --clear --mbrtogpt -- '/dev/{{ item.0.item.key }}'"
|
||||||
with_together:
|
with_together:
|
||||||
- '{{ combined_osd_partition_status_results.results }}'
|
- "{{ osd_partition_status_results.results }}"
|
||||||
- '{{ ansible_devices }}'
|
- "{{ ansible_devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- journal_collocation
|
- journal_collocation
|
||||||
|
@ -36,10 +36,10 @@
|
||||||
|
|
||||||
- name: check if a partition named 'ceph' exists (autodiscover disks)
|
- name: check if a partition named 'ceph' exists (autodiscover disks)
|
||||||
shell: "parted --script /dev/{{ item.key }} print | egrep -sq '^ 1.*ceph'"
|
shell: "parted --script /dev/{{ item.key }} print | egrep -sq '^ 1.*ceph'"
|
||||||
with_dict: '{{ ansible_devices }}'
|
with_dict: "{{ ansible_devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: combined_parted_results
|
register: parted_results
|
||||||
when:
|
when:
|
||||||
- ansible_devices is defined
|
- ansible_devices is defined
|
||||||
- item.value.removable == "0"
|
- item.value.removable == "0"
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
---
|
---
|
||||||
- name: check if the device is a partition
|
- name: check if the device is a partition
|
||||||
shell: "echo '{{ item }}' | egrep '/dev/([hsv]d[a-z]{1,2}|cciss/c[0-9]d[0-9]p|nvme[0-9]n[0-9]p)[0-9]{1,2}$'"
|
shell: "echo '{{ item }}' | egrep '/dev/([hsv]d[a-z]{1,2}|cciss/c[0-9]d[0-9]p|nvme[0-9]n[0-9]p)[0-9]{1,2}$'"
|
||||||
with_items: '{{ devices }}'
|
with_items: "{{ devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: combined_ispartition_results
|
register: ispartition_results
|
||||||
|
|
||||||
- name: check the partition status of the osd disks
|
- name: check the partition status of the osd disks
|
||||||
shell: "parted --script {{ item }} print > /dev/null 2>&1"
|
shell: "parted --script {{ item }} print > /dev/null 2>&1"
|
||||||
with_items: '{{ devices }}'
|
with_items: "{{ devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: combined_osd_partition_status_results
|
register: osd_partition_status_results
|
||||||
when:
|
when:
|
||||||
- journal_collocation or raw_multi_journal
|
- journal_collocation or raw_multi_journal
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@
|
||||||
- name: fix partitions gpt header or labels of the osd disks
|
- name: fix partitions gpt header or labels of the osd disks
|
||||||
shell: "sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }} || sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }}"
|
shell: "sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }} || sgdisk --zap-all --clear --mbrtogpt -- {{ item.1 }}"
|
||||||
with_together:
|
with_together:
|
||||||
- '{{ combined_osd_partition_status_results.results }}'
|
- "{{ osd_partition_status_results.results }}"
|
||||||
- '{{ devices }}'
|
- "{{ devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- journal_collocation or raw_multi_journal
|
- journal_collocation or raw_multi_journal
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
- name: check if a partition named 'ceph' exists
|
- name: check if a partition named 'ceph' exists
|
||||||
shell: "parted --script {{ item }} print | egrep -sq '^ 1.*ceph'"
|
shell: "parted --script {{ item }} print | egrep -sq '^ 1.*ceph'"
|
||||||
with_items: '{{ devices }}'
|
with_items: "{{ devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: combined_parted_results
|
register: parted_results
|
||||||
|
|
|
@ -1,36 +1,52 @@
|
||||||
---
|
---
|
||||||
- include: pre_requisite.yml
|
- include: pre_requisite.yml
|
||||||
when: not osd_containerized_deployment
|
when: not osd_containerized_deployment
|
||||||
|
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
|
||||||
|
static: False
|
||||||
|
|
||||||
- include: ./scenarios/journal_collocation.yml
|
- include: ./scenarios/journal_collocation.yml
|
||||||
when:
|
when:
|
||||||
- journal_collocation
|
- journal_collocation
|
||||||
- not osd_containerized_deployment
|
- not osd_containerized_deployment
|
||||||
|
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
|
||||||
|
static: False
|
||||||
|
|
||||||
- include: ./scenarios/raw_multi_journal.yml
|
- include: ./scenarios/raw_multi_journal.yml
|
||||||
when:
|
when:
|
||||||
- raw_multi_journal
|
- raw_multi_journal
|
||||||
- not osd_containerized_deployment
|
- not osd_containerized_deployment
|
||||||
|
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
|
||||||
|
static: False
|
||||||
|
|
||||||
- include: ./scenarios/osd_directory.yml
|
- include: ./scenarios/osd_directory.yml
|
||||||
when:
|
when:
|
||||||
- osd_directory
|
- osd_directory
|
||||||
- not osd_containerized_deployment
|
- not osd_containerized_deployment
|
||||||
|
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
|
||||||
|
static: False
|
||||||
|
|
||||||
- include: ./scenarios/bluestore.yml
|
- include: ./scenarios/bluestore.yml
|
||||||
when:
|
when:
|
||||||
- osd_objectstore == 'bluestore'
|
- osd_objectstore == 'bluestore'
|
||||||
- not osd_containerized_deployment
|
- not osd_containerized_deployment
|
||||||
|
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
|
||||||
|
static: False
|
||||||
|
|
||||||
- include: ./scenarios/dmcrypt-journal-colocation.yml
|
- include: ./scenarios/dmcrypt-journal-colocation.yml
|
||||||
when:
|
when:
|
||||||
- dmcrypt_journal_colocation
|
- dmcrypt_journal_colocation
|
||||||
- not osd_containerized_deployment
|
- not osd_containerized_deployment
|
||||||
|
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
|
||||||
|
static: False
|
||||||
|
|
||||||
- include: ./scenarios/dmcrypt-dedicated-journal.yml
|
- include: ./scenarios/dmcrypt-dedicated-journal.yml
|
||||||
when:
|
when:
|
||||||
- dmcrypt_dedicated_journal
|
- dmcrypt_dedicated_journal
|
||||||
- not osd_containerized_deployment
|
- not osd_containerized_deployment
|
||||||
|
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
|
||||||
|
static: False
|
||||||
|
|
||||||
- include: ./docker/main.yml
|
- include: ./docker/main.yml
|
||||||
when: osd_containerized_deployment
|
when: osd_containerized_deployment
|
||||||
|
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
|
||||||
|
static: False
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
- name: manually prepare osd disk(s)
|
- name: manually prepare osd disk(s)
|
||||||
command: ceph-disk prepare --bluestore --cluster "{{ cluster }}" "{{ item.2 }}"
|
command: ceph-disk prepare --bluestore --cluster "{{ cluster }}" "{{ item.2 }}"
|
||||||
with_together:
|
with_together:
|
||||||
- combined_parted_results.results
|
- parted_results.results
|
||||||
- combined_ispartition_results.results
|
- ispartition_results.results
|
||||||
- devices
|
- devices
|
||||||
when:
|
when:
|
||||||
- not item.0.get("skipped")
|
- not item.0.get("skipped")
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
- name: prepare osd disk(s)
|
- name: prepare osd disk(s)
|
||||||
command: "ceph-disk prepare --dmcrypt --cluster {{ cluster }} {{ item.2 }} {{ item.3 }}"
|
command: "ceph-disk prepare --dmcrypt --cluster {{ cluster }} {{ item.2 }} {{ item.3 }}"
|
||||||
with_together:
|
with_together:
|
||||||
- combined_parted_results.results
|
- parted_results.results
|
||||||
- combined_ispartition_results.results
|
- ispartition_results.results
|
||||||
- devices
|
- devices
|
||||||
- raw_journal_devices
|
- raw_journal_devices
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
- name: manually prepare osd disk(s) (dmcrypt)
|
- name: manually prepare osd disk(s) (dmcrypt)
|
||||||
command: ceph-disk prepare --dmcrypt --cluster "{{ cluster }}" "{{ item.2 }}"
|
command: ceph-disk prepare --dmcrypt --cluster "{{ cluster }}" "{{ item.2 }}"
|
||||||
with_together:
|
with_together:
|
||||||
- combined_parted_results.results
|
- parted_results.results
|
||||||
- combined_ispartition_results.results
|
- ispartition_results.results
|
||||||
- devices
|
- devices
|
||||||
when:
|
when:
|
||||||
- not item.0.get("skipped")
|
- not item.0.get("skipped")
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
- name: manually prepare osd disk(s)
|
- name: manually prepare osd disk(s)
|
||||||
command: "ceph-disk prepare --cluster {{ cluster }} {{ item.2 }}"
|
command: "ceph-disk prepare --cluster {{ cluster }} {{ item.2 }}"
|
||||||
with_together:
|
with_together:
|
||||||
- combined_parted_results.results
|
- parted_results.results
|
||||||
- combined_ispartition_results.results
|
- ispartition_results.results
|
||||||
- devices
|
- devices
|
||||||
when:
|
when:
|
||||||
- not item.0.get("skipped")
|
- not item.0.get("skipped")
|
||||||
|
|
|
@ -12,10 +12,10 @@
|
||||||
- name: prepare osd disk(s)
|
- name: prepare osd disk(s)
|
||||||
command: "ceph-disk prepare --cluster {{ cluster }} {{ item.2 }} {{ item.3 }}"
|
command: "ceph-disk prepare --cluster {{ cluster }} {{ item.2 }} {{ item.3 }}"
|
||||||
with_together:
|
with_together:
|
||||||
- combined_parted_results.results
|
- "{{ parted_results.results }}"
|
||||||
- combined_ispartition_results.results
|
- "{{ ispartition_results.results }}"
|
||||||
- devices
|
- "{{ devices }}"
|
||||||
- raw_journal_devices
|
- "{{ raw_journal_devices }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- not item.0.get("skipped")
|
- not item.0.get("skipped")
|
||||||
|
|
Loading…
Reference in New Issue