Add Manila key generation and distribution
Change-Id: I2515dc4abf93f2d30157a376c8a9a497c865aaf5
This commit is contained in:
parent
3a7d20720a
commit
a045397c57
@ -288,3 +288,11 @@ manila_api_uwsgi_ini_overrides: {}
|
|||||||
manila_environment_overrides:
|
manila_environment_overrides:
|
||||||
Service:
|
Service:
|
||||||
Environment: "PATH={{ manila_bin }}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
Environment: "PATH={{ manila_bin }}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||||
|
|
||||||
|
# Manila keypair
|
||||||
|
#
|
||||||
|
# The following path ontains the keypair which will be used for SSH. It requires that
|
||||||
|
# the same file with a trailing .pub exists as well if using an existing key. If this
|
||||||
|
# is set and a key cannot be found it will generate one.
|
||||||
|
#
|
||||||
|
# manila_keypair_path: /etc/openstack_deploy/id_rsa
|
||||||
|
@ -115,7 +115,14 @@
|
|||||||
tags:
|
tags:
|
||||||
- manila-config
|
- manila-config
|
||||||
|
|
||||||
- import_tasks: manila_db_sync.yml
|
- import_tasks: manila_keys.yml
|
||||||
|
when:
|
||||||
|
- manila_keypair_path is defined
|
||||||
|
- manila_services['manila-share']['group'] in group_names
|
||||||
|
tags:
|
||||||
|
- manila-config
|
||||||
|
|
||||||
|
- include_tasks: manila_db_sync.yml
|
||||||
when:
|
when:
|
||||||
- _manila_is_first_play_host
|
- _manila_is_first_play_host
|
||||||
tags:
|
tags:
|
||||||
|
17
tasks/manila_keys.yml
Normal file
17
tasks/manila_keys.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
- name: Create SSH keypair
|
||||||
|
run_once: true
|
||||||
|
delegate_to: localhost
|
||||||
|
openssh_keypair:
|
||||||
|
path: "{{ manila_keypair_path }}"
|
||||||
|
|
||||||
|
- name: Distribute SSH keypair
|
||||||
|
copy:
|
||||||
|
src: "{{ item }}"
|
||||||
|
dest: "/etc/manila/{{ item | basename }}"
|
||||||
|
owner: "{{ manila_system_user_name }}"
|
||||||
|
group: "{{ manila_system_group_name }}"
|
||||||
|
mode: 0600
|
||||||
|
loop:
|
||||||
|
- "{{ manila_keypair_path }}.pub"
|
||||||
|
- "{{ manila_keypair_path }}"
|
Loading…
x
Reference in New Issue
Block a user