diff --git a/roles/ceph-osd/tasks/activate_osds.yml b/roles/ceph-osd/tasks/activate_osds.yml index 3ce153463..babccbaa4 100644 --- a/roles/ceph-osd/tasks/activate_osds.yml +++ b/roles/ceph-osd/tasks/activate_osds.yml @@ -2,8 +2,7 @@ # NOTE (leseb) : this task is for disk devices only because of the explicit use of the first # partition. - 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: - ispartition.results - devices @@ -25,7 +24,7 @@ when: crush_location - name: start and add that the osd service(s) to the init sequence - service: > - name=ceph - state=started - enabled=yes + service: + name: ceph + state: started + enabled: yes diff --git a/roles/ceph-osd/tasks/docker/fetch_configs.yml b/roles/ceph-osd/tasks/docker/fetch_configs.yml index 43f025d68..80b100ec2 100644 --- a/roles/ceph-osd/tasks/docker/fetch_configs.yml +++ b/roles/ceph-osd/tasks/docker/fetch_configs.yml @@ -14,12 +14,12 @@ register: statconfig - name: try to fetch ceph config and keys - copy: > - src={{ fetch_directory }}/docker_mon_files/{{ item.0 }} - dest={{ item.0 }} - owner=root - group=root - mode=644 + copy: + src=: "{ fetch_directory }}/docker_mon_files/{{ item.0 }}" + dest: "{{ item.0 }}" + owner: root + group: root + mode: 644 changed_when: false with_together: - ceph_config_keys diff --git a/roles/ceph-osd/tasks/docker/pre_requisite.yml b/roles/ceph-osd/tasks/docker/pre_requisite.yml index 77ed25fd2..274c5b953 100644 --- a/roles/ceph-osd/tasks/docker/pre_requisite.yml +++ b/roles/ceph-osd/tasks/docker/pre_requisite.yml @@ -1,11 +1,11 @@ --- - name: create osd bootstrap directory - file: > - path=/var/lib/ceph/bootstrap-osd - state=directory + file: + path: /var/lib/ceph/bootstrap-osd + state: directory # NOTE (leseb): for version 1.1.0 because https://github.com/ansible/ansible-modules-core/issues/1227 - name: install docker-py - pip: > - name=docker-py - version=1.1.0 + pip: + name: docker-py + version: 1.1.0 diff --git a/roles/ceph-osd/tasks/docker/start_docker_osd.yml b/roles/ceph-osd/tasks/docker/start_docker_osd.yml index 4d09367a4..847b07ebe 100644 --- a/roles/ceph-osd/tasks/docker/start_docker_osd.yml +++ b/roles/ceph-osd/tasks/docker/start_docker_osd.yml @@ -1,12 +1,12 @@ --- - name: run the ceph osd docker image - docker: > - image="{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}" - name={{ ansible_hostname }}-osd-{{ item | regex_replace('/', '') }} - net=host - pid=host - state=running - privileged=yes - env="OSD_DEVICE={{ item }},{{ ceph_osd_docker_extra_env }}" - volumes="/var/lib/ceph:/var/lib/ceph,/etc/ceph:/etc/ceph,/dev/:/dev/" + docker: + image: "{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}" + name: "{{ ansible_hostname }}-osd-{{ item | regex_replace('/', '') }}" + net: host + pid: host + state: running + privileged: yes + env: "OSD_DEVICE={{ item }},{{ ceph_osd_docker_extra_env }}" + volumes: "/var/lib/ceph:/var/lib/ceph,/etc/ceph:/etc/ceph,/dev/:/dev/" with_items: ceph_osd_docker_devices diff --git a/roles/ceph-osd/tasks/osd_fragment.yml b/roles/ceph-osd/tasks/osd_fragment.yml index 5bbaf9c73..b219b6120 100644 --- a/roles/ceph-osd/tasks/osd_fragment.yml +++ b/roles/ceph-osd/tasks/osd_fragment.yml @@ -14,20 +14,20 @@ register: osd_id - name: create a ceph fragment and assemble directory - file: > - path={{ item }} - state=directory - owner=root - group=root - mode=0644 + file: + path: "{{ item }}" + state: directory + owner: root + group: root + mode: 0644 with_items: - /etc/ceph/ceph.d/ - /etc/ceph/ceph.d/osd_fragments - name: create the osd fragment - template: > - src=osd.conf.j2 - dest=/etc/ceph/ceph.d/osd_fragments/osd.{{ item.stdout }}.conf + template: + src: osd.conf.j2 + dest: /etc/ceph/ceph.d/osd_fragments/osd.{{ item.stdout }}.conf with_items: osd_id.results - name: copy ceph.conf for assembling @@ -35,17 +35,17 @@ changed_when: false - name: assemble osd sections - assemble: > - src=/etc/ceph/ceph.d/osd_fragments/ - dest=/etc/ceph/ceph.d/osd.conf - owner=root - group=root - mode=0644 + assemble: + src: /etc/ceph/ceph.d/osd_fragments/ + dest: /etc/ceph/ceph.d/osd.conf + owner: root + group: root + mode: 0644 - name: assemble ceph conf and osd fragments - assemble: > - src=/etc/ceph/ceph.d/ - dest=/etc/ceph/ceph.conf - owner=root - group=root - mode=0644 + assemble: + src: /etc/ceph/ceph.d/ + dest: /etc/ceph/ceph.conf + owner: root + group: root + mode: 0644 diff --git a/roles/ceph-osd/tasks/pre_requisite.yml b/roles/ceph-osd/tasks/pre_requisite.yml index 1d4d03368..5db14a273 100644 --- a/roles/ceph-osd/tasks/pre_requisite.yml +++ b/roles/ceph-osd/tasks/pre_requisite.yml @@ -1,21 +1,21 @@ --- - name: install dependencies - apt: > - pkg=parted - state=present + apt: + pkg: parted + state: present when: ansible_os_family == 'Debian' - name: install dependencies - yum: > - name=parted - state=present + yum: + name: parted + state: present when: ansible_os_family == 'RedHat' - name: copy osd bootstrap key - copy: > - src={{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-osd/ceph.keyring - dest=/var/lib/ceph/bootstrap-osd/ceph.keyring - owner=root - group=root - mode=600 + copy: + src: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-osd/ceph.keyring" + dest: /var/lib/ceph/bootstrap-osd/ceph.keyring + owner: root + group: root + mode: 600 when: cephx diff --git a/roles/ceph-osd/tasks/scenarios/osd_directory.yml b/roles/ceph-osd/tasks/scenarios/osd_directory.yml index be6754024..9e4703bee 100644 --- a/roles/ceph-osd/tasks/scenarios/osd_directory.yml +++ b/roles/ceph-osd/tasks/scenarios/osd_directory.yml @@ -5,11 +5,11 @@ # so it is really up to you to configure this properly. # Declaring more than one directory on the same filesystem will confuse Ceph. - name: create osd directories - file: > - path={{ item }} - state=directory - owner=root - group=root + file: + path: "{{ item }}" + state: directory + owner: root + group: root with_items: osd_directories # NOTE (leseb): the prepare process must be parallelized somehow... @@ -27,7 +27,7 @@ changed_when: false - name: start and add that the OSD service to the init sequence - service: > - name=ceph - state=started - enabled=yes + service: + name: ceph + state: started + enabled: yes