Fixed quotes and removed combined_ prefix from variables that no longer need it

pull/924/head
James Saint-Rossy 2016-08-16 17:49:30 -04:00
parent 5f61ff7867
commit 35a26068ef
10 changed files with 59 additions and 39 deletions

View File

@ -16,8 +16,8 @@
- 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
with_together:
- combined_ispartition_results.results
- devices
- "{{ ispartition_results.results }}"
- "{{ devices }}"
changed_when: false
failed_when: false
register: activate_osd_disk
@ -41,8 +41,8 @@
- 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
with_together:
- combined_ispartition_results.results
- devices
- "{{ ispartition_results.results }}"
- "{{ devices }}"
changed_when: false
failed_when: false
register: activate_osd_disk_dmcrypt
@ -63,14 +63,14 @@
msg: "ceph-disk failed to create an OSD"
when:
" 'ceph-disk: Error: ceph osd create failed' in item.get('stderr', '') "
with_items: "{{combined_activate_osd_disk_results.results}}"
with_items: "{{ combined_activate_osd_disk_results.results }}"
# NOTE (leseb): this task is for partitions because we don't explicitly use a partition.
- name: activate osd(s) when device is a partition
command: "ceph-disk activate {{ item.1 }}"
with_together:
- combined_ispartition_results.results
- devices
- "{{ ispartition_results.results }}"
- "{{ devices }}"
changed_when: false
failed_when: false
when:
@ -113,7 +113,7 @@
command: systemctl enable ceph-osd@{{ item }}
changed_when: false
failed_when: false
with_items: osd_id.stdout_lines
with_items: "{{ osd_id.stdout_lines }}"
when:
- use_systemd
- is_after_hammer
@ -123,7 +123,7 @@
name: ceph-osd@{{ item }}
state: started
enabled: yes
with_items: osd_id.stdout_lines
with_items: "{{ osd_id.stdout_lines }}"
changed_when: false
when:
- use_systemd

View File

@ -12,13 +12,17 @@
- include: ./check_devices_static.yml
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
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
shell: "parted --script {{ item }} print > /dev/null 2>&1"
with_items: '{{ raw_journal_devices }}'
with_items: "{{ raw_journal_devices }}"
changed_when: false
failed_when: false
register: journal_partition_status
@ -27,8 +31,8 @@
- 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 }}"
with_together:
- '{{ journal_partition_status.results }}'
- '{{ raw_journal_devices }}'
- "{{ journal_partition_status.results }}"
- "{{ raw_journal_devices }}"
changed_when: false
when:
- raw_multi_journal

View File

@ -1,10 +1,10 @@
---
- 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}$'"
with_dict: '{{ ansible_devices }}'
with_dict: "{{ ansible_devices }}"
changed_when: false
failed_when: false
register: '{{ combined_ispartition_results }}'
register: "{{ ispartition_results }}"
when:
- ansible_devices is defined
- item.value.removable == "0"
@ -14,7 +14,7 @@
with_dict: '{{ ansible_devices }}'
changed_when: false
failed_when: false
register: combined_osd_partition_status_results
register: osd_partition_status_results
when:
- journal_collocation or raw_multi_journal
- ansible_devices is defined
@ -24,8 +24,8 @@
- 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 }}'"
with_together:
- '{{ combined_osd_partition_status_results.results }}'
- '{{ ansible_devices }}'
- "{{ osd_partition_status_results.results }}"
- "{{ ansible_devices }}"
changed_when: false
when:
- journal_collocation
@ -36,10 +36,10 @@
- name: check if a partition named 'ceph' exists (autodiscover disks)
shell: "parted --script /dev/{{ item.key }} print | egrep -sq '^ 1.*ceph'"
with_dict: '{{ ansible_devices }}'
with_dict: "{{ ansible_devices }}"
changed_when: false
failed_when: false
register: combined_parted_results
register: parted_results
when:
- ansible_devices is defined
- item.value.removable == "0"

View File

@ -1,17 +1,17 @@
---
- 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}$'"
with_items: '{{ devices }}'
with_items: "{{ devices }}"
changed_when: false
failed_when: false
register: combined_ispartition_results
register: ispartition_results
- name: check the partition status of the osd disks
shell: "parted --script {{ item }} print > /dev/null 2>&1"
with_items: '{{ devices }}'
with_items: "{{ devices }}"
changed_when: false
failed_when: false
register: combined_osd_partition_status_results
register: osd_partition_status_results
when:
- journal_collocation or raw_multi_journal
@ -23,8 +23,8 @@
- 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 }}"
with_together:
- '{{ combined_osd_partition_status_results.results }}'
- '{{ devices }}'
- "{{ osd_partition_status_results.results }}"
- "{{ devices }}"
changed_when: false
when:
- journal_collocation or raw_multi_journal
@ -32,7 +32,7 @@
- name: check if a partition named 'ceph' exists
shell: "parted --script {{ item }} print | egrep -sq '^ 1.*ceph'"
with_items: '{{ devices }}'
with_items: "{{ devices }}"
changed_when: false
failed_when: false
register: combined_parted_results
register: parted_results

View File

@ -1,36 +1,52 @@
---
- include: pre_requisite.yml
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
when:
- journal_collocation
- 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
when:
- raw_multi_journal
- 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
when:
- osd_directory
- 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
when:
- osd_objectstore == 'bluestore'
- 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
when:
- dmcrypt_journal_colocation
- 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
when:
- dmcrypt_dedicated_journal
- 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
when: osd_containerized_deployment
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False

View File

@ -23,8 +23,8 @@
- name: manually prepare osd disk(s)
command: ceph-disk prepare --bluestore --cluster "{{ cluster }}" "{{ item.2 }}"
with_together:
- combined_parted_results.results
- combined_ispartition_results.results
- parted_results.results
- ispartition_results.results
- devices
when:
- not item.0.get("skipped")

View File

@ -12,8 +12,8 @@
- name: prepare osd disk(s)
command: "ceph-disk prepare --dmcrypt --cluster {{ cluster }} {{ item.2 }} {{ item.3 }}"
with_together:
- combined_parted_results.results
- combined_ispartition_results.results
- parted_results.results
- ispartition_results.results
- devices
- raw_journal_devices
changed_when: false

View File

@ -22,8 +22,8 @@
- name: manually prepare osd disk(s) (dmcrypt)
command: ceph-disk prepare --dmcrypt --cluster "{{ cluster }}" "{{ item.2 }}"
with_together:
- combined_parted_results.results
- combined_ispartition_results.results
- parted_results.results
- ispartition_results.results
- devices
when:
- not item.0.get("skipped")

View File

@ -23,8 +23,8 @@
- name: manually prepare osd disk(s)
command: "ceph-disk prepare --cluster {{ cluster }} {{ item.2 }}"
with_together:
- combined_parted_results.results
- combined_ispartition_results.results
- parted_results.results
- ispartition_results.results
- devices
when:
- not item.0.get("skipped")

View File

@ -12,10 +12,10 @@
- name: prepare osd disk(s)
command: "ceph-disk prepare --cluster {{ cluster }} {{ item.2 }} {{ item.3 }}"
with_together:
- combined_parted_results.results
- combined_ispartition_results.results
- devices
- raw_journal_devices
- "{{ parted_results.results }}"
- "{{ ispartition_results.results }}"
- "{{ devices }}"
- "{{ raw_journal_devices }}"
changed_when: false
when:
- not item.0.get("skipped")