Improve readibility.
Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
command: poweroff
- name: Wait for the server to go down
- local_action: wait_for host=<your_host> port=22 state=stopped
+ local_action: >
+ wait_for host=<your_host>
+ port=22
+ state=stopped
- name: Wait for the server to come up
- local_action: wait_for host=<your_host port=22 delay=10 timeout=3600
+ local_action: >
+ wait_for host=<your_host
+ port=22
+ delay=10
+ timeout=3600
- name: Unset the noout flag
command: ceph osd unset noout
when: ceph_stable_ice
- name: Add Ceph stable repository
- command: "rpm -U http://ceph.com/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro|replace('rhel', 'el') }}.noarch.rpm creates=/etc/yum.repos.d/ceph.repo"
+ command: >
+ rpm -U http://ceph.com/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro|replace('rhel', 'el') }}.noarch.rpm
+ creates=/etc/yum.repos.d/ceph.repo
when: ceph_stable
- name: Add Ceph development repository
- command: "rpm -U http://gitbuilder.ceph.com/ceph-rpm-{{ ceph_dev_redhat_distro }}-x86_64-basic/ref/{{ ceph_dev_branch }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro }}.noarch.rpm creates=/etc/yum.repos.d/ceph.repo"
+ command: >
+ rpm -U http://gitbuilder.ceph.com/ceph-rpm-{{ ceph_dev_redhat_distro }}-x86_64-basic/ref/{{ ceph_dev_branch }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro }}.noarch.rpm
+ creates=/etc/yum.repos.d/ceph.repo
when: ceph_dev
- name: Add Inktank Ceph Enterprise repository
register: socket
- name: Generate cluster UUID
- shell: uuidgen | tee fetch/ceph_cluster_uuid.conf creates=fetch/ceph_cluster_uuid.conf
+ shell: >
+ uuidgen | tee fetch/ceph_cluster_uuid.conf
+ creates=fetch/ceph_cluster_uuid.conf
connection: local
sudo: false
register: cluster_uuid
- name: Read cluster UUID if it already exists
- command: cat fetch/ceph_cluster_uuid.conf removes=fetch/ceph_cluster_uuid.conf
+ command: >
+ cat fetch/ceph_cluster_uuid.conf
+ removes=fetch/ceph_cluster_uuid.conf
connection: local
sudo: false
register: cluster_uuid
when: ceph_stable_ice
- name: Extract ICE packages
- shell: "cd {{ ceph_stable_ice_temp_path }} && tar -xzf ICE-{{ ceph_stable_ice_version }}-{{ ceph_stable_ice_distro }}.tar.gz"
+ shell: >
+ tar -xzf ICE-{{ ceph_stable_ice_version }}-{{ ceph_stable_ice_distro }}.tar.gz
+ chdir={{ ceph_stable_ice_temp_path }}
when: ceph_stable_ice and repo_exist.stat.exists == False
- name: Move ICE extracted packages
when: cephx
- name: Create MDS keyring
- command: ceph --cluster ceph --name client.bootstrap-mds --keyring /var/lib/ceph/bootstrap-mds/ceph.keyring auth get-or-create mds.{{ ansible_hostname }} osd 'allow rwx' mds 'allow' mon 'allow profile mds' -o /var/lib/ceph/mds/ceph-{{ ansible_hostname }}/keyring creates=/var/lib/ceph/mds/ceph-{{ ansible_hostname }}/keyring
+ command: >
+ ceph --cluster ceph --name client.bootstrap-mds --keyring /var/lib/ceph/bootstrap-mds/ceph.keyring auth get-or-create mds.{{ ansible_hostname }} osd 'allow rwx' mds 'allow' mon 'allow profile mds' -o /var/lib/ceph/mds/ceph-{{ ansible_hostname }}/keyring
+ creates=/var/lib/ceph/mds/ceph-{{ ansible_hostname }}/keyring
when: cephx
changed_when: False
wait_for: path=/etc/ceph/ceph.client.admin.keyring
- name: Create RGW keyring
- command: ceph auth get-or-create client.radosgw.{{ hostvars[item]['ansible_hostname'] }} osd 'allow rwx' mon 'allow rw' -o /etc/ceph/radosgw.{{ hostvars[item]['ansible_hostname'] }}.keyring creates=/etc/ceph/radosgw.{{ hostvars[item]['ansible_hostname'] }}.keyring
+ command: >
+ ceph auth get-or-create client.radosgw.{{ hostvars[item]['ansible_hostname'] }} osd 'allow rwx' mon 'allow rw' -o /etc/ceph/radosgw.{{ hostvars[item]['ansible_hostname'] }}.keyring
+ creates=/etc/ceph/radosgw.{{ hostvars[item]['ansible_hostname'] }}.keyring
when: cephx and radosgw
with_items: groups.rgws
changed_when: False
---
- name: Create monitor initial keyring
- command: "ceph-authtool /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }} --create-keyring --name=mon. --add-key={{ monitor_secret | mandatory }} --cap mon 'allow *' creates=/var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}"
+ command: >
+ ceph-authtool /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }} --create-keyring --name=mon. --add-key={{ monitor_secret | mandatory }} --cap mon 'allow *'
+ creates=/var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}
- name: Set initial monitor key permissions
file: >
mode=0644
- name: Ceph monitor mkfs
- command: "ceph-mon --mkfs -i {{ ansible_hostname }} --fsid {{ fsid }} --keyring /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }} creates=/var/lib/ceph/mon/ceph-{{ ansible_hostname }}/keyring"
+ command: >
+ ceph-mon --mkfs -i {{ ansible_hostname }} --fsid {{ fsid }} --keyring /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}
+ creates=/var/lib/ceph/mon/ceph-{{ ansible_hostname }}/keyring
- name: Start and add that the monitor service to the init sequence
service: >
---
-
- name: Create OpenStack pool
command: rados mkpool {{ item }}
with_items:
ignore_errors: True
- name: Create OpenStack keys
- command: ceph auth get-or-create {{ item.name }} {{ item.value }} -o /etc/ceph/ceph.{{ item.name }}.keyring creates=/etc/ceph/ceph.{{ item.name }}.keyring
+ command: >
+ ceph auth get-or-create {{ item.name }} {{ item.value }} -o /etc/ceph/ceph.{{ item.name }}.keyring
+ creates=/etc/ceph/ceph.{{ item.name }}.keyring
with_items: openstack_keys
devices:\r
- /dev/sdb\r
- /dev/sdc\r
- - /dev/sdd\r
- - /dev/sde\r
\r
# Device discovery is based on the Ansible fact 'ansible_devices'\r
# which reports all the devices on a system. If chosen all the disks\r
#
- name: Install default httpd.conf
- template: src=httpd.conf dest=/etc/apache2/httpd.conf owner=root group=root
+ template: >
+ src=httpd.conf
+ dest=/etc/apache2/httpd.conf
+ owner=root
+ group=root
- name: Enable some apache mod rewrite and fastcgi
command: "{{ item }}"