manila share container name variable
manila share container name variable is fixed in some places, but in the defaults directory, manila share container_name variable is variable. If the manila share container_name variable is changed during deployment, it will not be assigned to container name, but a fixed 'manila_share' name. Change-Id: Iea23c62518add8d6820b76b16edd3221906b0ffb
This commit is contained in:
parent
c9ca7e5529
commit
fa16190910
@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: Check /tmp/cephfs path
|
||||
become: true
|
||||
command: "docker exec -u 0 manila_share ls /tmp/cephfs/"
|
||||
command: "docker exec -u 0 {{ manila_services['manila-share']['container_name'] }} ls /tmp/cephfs/"
|
||||
register: check_cephfs
|
||||
changed_when: False
|
||||
failed_when: check_cephfs.rc != 0 and check_cephfs.stderr.find('No such file or directory') == -1
|
||||
@ -9,13 +9,13 @@
|
||||
|
||||
- name: Create /tmp/cephfs path
|
||||
become: true
|
||||
command: "docker exec -u 0 manila_share mkdir -p /tmp/cephfs"
|
||||
command: "docker exec -u 0 {{ manila_services['manila-share']['container_name'] }} mkdir -p /tmp/cephfs"
|
||||
run_once: True
|
||||
when: check_cephfs.rc != 0
|
||||
|
||||
- name: Get monitor dump
|
||||
become: true
|
||||
command: docker exec manila_share ceph mon dump -c /etc/ceph/ceph.conf --name client.manila -f json
|
||||
command: docker exec "{{ manila_services['manila-share']['container_name'] }}" ceph mon dump -c /etc/ceph/ceph.conf --name client.manila -f json
|
||||
register: ceph_monitor_dump
|
||||
changed_when: False
|
||||
run_once: True
|
||||
@ -32,14 +32,14 @@
|
||||
|
||||
- name: Get cephfs secret
|
||||
become: true
|
||||
command: docker exec manila_share ceph-authtool -p /etc/ceph/ceph.client.manila.keyring -n client.manila
|
||||
command: docker exec "{{ manila_services['manila-share']['container_name'] }}" ceph-authtool -p /etc/ceph/ceph.client.manila.keyring -n client.manila
|
||||
register: manila_keyring
|
||||
changed_when: False
|
||||
run_once: True
|
||||
|
||||
- name: Umount cephfs
|
||||
become: true
|
||||
command: "docker exec -u 0 manila_share umount /tmp/cephfs/"
|
||||
command: "docker exec -u 0 {{ manila_services['manila-share']['container_name'] }} umount /tmp/cephfs/"
|
||||
register: umount_cephfs
|
||||
changed_when: False
|
||||
failed_when: False
|
||||
@ -47,14 +47,14 @@
|
||||
|
||||
- name: Mount cephfs
|
||||
become: true
|
||||
command: "docker exec -u 0 manila_share mount -t ceph {{ cephfs_addr }} /tmp/cephfs -o name=manila,secret={{ manila_keyring.stdout }}"
|
||||
command: "docker exec -u 0 {{ manila_services['manila-share']['container_name'] }} mount -t ceph {{ cephfs_addr }} /tmp/cephfs -o name=manila,secret={{ manila_keyring.stdout }}"
|
||||
register: mount_cephfs
|
||||
changed_when: False
|
||||
run_once: True
|
||||
|
||||
- name: Check volumes path
|
||||
become: true
|
||||
command: "docker exec -u 0 manila_share ls /tmp/cephfs/volumes"
|
||||
command: "docker exec -u 0 {{ manila_services['manila-share']['container_name'] }} ls /tmp/cephfs/volumes"
|
||||
register: check_volume
|
||||
changed_when: False
|
||||
failed_when: False
|
||||
@ -62,21 +62,21 @@
|
||||
|
||||
- name: Create /tmp/cephfs/volumes path
|
||||
become: true
|
||||
command: "docker exec -u 0 manila_share mkdir /tmp/cephfs/volumes"
|
||||
command: "docker exec -u 0 {{ manila_services['manila-share']['container_name'] }} mkdir /tmp/cephfs/volumes"
|
||||
register: create_volume
|
||||
run_once: True
|
||||
when: check_volume.rc != 0
|
||||
|
||||
- name: Change the owner and group of /tmp/cephfs/volumes
|
||||
become: true
|
||||
command: "docker exec -u 0 manila_share chown manila:manila /tmp/cephfs/volumes"
|
||||
command: "docker exec -u 0 {{ manila_services['manila-share']['container_name'] }} chown manila:manila /tmp/cephfs/volumes"
|
||||
register: chown_volume
|
||||
run_once: True
|
||||
when: check_volume.rc != 0 and create_volume.rc == 0
|
||||
|
||||
- name: Umount cephfs
|
||||
become: true
|
||||
command: "docker exec -u 0 manila_share umount /tmp/cephfs"
|
||||
command: "docker exec -u 0 {{ manila_services['manila-share']['container_name'] }} umount /tmp/cephfs"
|
||||
changed_when: False
|
||||
register: umount_cephfs
|
||||
run_once: True
|
||||
|
Loading…
x
Reference in New Issue
Block a user