diff --git a/roles/cinder-storage/tasks/main.yml b/roles/cinder-storage/tasks/main.yml index ac8a9ac..e66bf7a 100644 --- a/roles/cinder-storage/tasks/main.yml +++ b/roles/cinder-storage/tasks/main.yml @@ -24,6 +24,11 @@ -e "RABBIT_HOST={{ listen_ip | default(hostvars[groups['rabbitmq'][0]]['ansible_default_ipv4']['address']) }}" -e "RABBIT_PASSWORD={{ secrets['RABBIT_PASSWORD'] }}" -e "RABBIT_USER=openstack" + -e "USE_CEPH={{ use_ceph }}" + -e "MON_INITIAL_MEMBERS={{ ceph_mon_initial_members }}" + -e "MON_HOST={{ ceph_mon_host }}" + -e "PUBLIC_NETWORK={{ ceph_public_network }}" + -e "OSD_POOL_DEFAULT_SIZE={{ ceph_osd_pool_default_size }}" tags: vars - name: pull docker image @@ -37,9 +42,9 @@ state: directory mode: 0777 with_items: - - /srv/cinder-storage - - /srv/cinder-storage/root - - /srv/cinder-storage/etc/ceph + - /srv/cinder-storage + - /srv/cinder-storage/root + - /srv/cinder-storage/etc/ceph - name: initial setup command: > @@ -62,7 +67,6 @@ dest: /srv/cinder-storage/etc/ceph/ceph.client.volumes.keyring mode: 0644 - - name: install service file. template: src: templates/cinder-storage.service @@ -72,6 +76,12 @@ group: root tags: systemd +- name: set ceph client keyring + copy: + content: "{{ceph_cinder_client_keyring}}" + dest: /srv/cinder-storage/etc/ceph + when: use_ceph + - command: systemctl daemon-reload tags: systemd diff --git a/roles/glance-controller/tasks/main.yml b/roles/glance-controller/tasks/main.yml index 95aaae7..0f842e1 100644 --- a/roles/glance-controller/tasks/main.yml +++ b/roles/glance-controller/tasks/main.yml @@ -19,7 +19,11 @@ -e "RABBIT_HOST={{ listen_ip | default(hostvars[groups['rabbitmq'][0]]['ansible_default_ipv4']['address']) }}" -e "RABBIT_PASSWORD={{ secrets['RABBIT_PASSWORD'] }}" -e "RABBIT_USER=openstack" - + -e "USE_CEPH={{ use_ceph }}" + -e "MON_INITIAL_MEMBERS={{ ceph_mon_initial_members }}" + -e "MON_HOST={{ ceph_mon_host }}" + -e "PUBLIC_NETWORK={{ ceph_public_network }}" + -e "OSD_POOL_DEFAULT_SIZE={{ ceph_osd_pool_default_size }}" #- name: pull docker image # docker_image: @@ -48,6 +52,12 @@ dest: /srv/glance/etc/ceph/ceph.client.volumes.keyring mode: 0644 +- name: set ceph client keyring + copy: + content: "{{ceph_images_client_keyring}}" + dest: /srv/cinder-storage/etc/ceph/ceph.client.images.keyring + when: use_ceph + - name: install service file. template: src: templates/glance.service diff --git a/roles/nova-compute/tasks/main.yml b/roles/nova-compute/tasks/main.yml index 42878fa..28aea9e 100644 --- a/roles/nova-compute/tasks/main.yml +++ b/roles/nova-compute/tasks/main.yml @@ -48,7 +48,7 @@ - name: set ceph client keyring copy: - content: "{{ceph_client_keyring}}" + content: "{{ceph_compute_client_keyring}}" dest: /srv/nova-compute/etc/ceph when: use_ceph