Merge "Add keypairs to infra_config sample and option to use key file"
This commit is contained in:
commit
40699f1257
11
README.md
11
README.md
@ -6,3 +6,14 @@ Instructions
|
||||
3. Run ``cp infra_config.yml.sample infra_config.yml``
|
||||
4. Edit infra_config.yml and put your environment values
|
||||
5. Run ``bash run.sh``
|
||||
|
||||
Notes
|
||||
=====
|
||||
|
||||
In infra_config.yml you may specify public key file instead of public key content, in the following way:
|
||||
|
||||
keypairs:
|
||||
- name: my_key_file
|
||||
public_key_file: /home/<my_user>/.ssh/<key_file>
|
||||
|
||||
Do not specify both 'public_key' and 'public_key_file', as they are mutual exclusive variables in Ansible.
|
||||
|
@ -1,8 +1,11 @@
|
||||
---
|
||||
os_client_config_cloud: envvars
|
||||
system_config_repo_url: git@your_git_server/system-config.git
|
||||
key_name: your_openstack_key
|
||||
key_name: your_openstack_key_name
|
||||
domainname: yourdomain
|
||||
keypairs:
|
||||
- name: my_key_name
|
||||
public_key: my_public_key_content
|
||||
infra_servers:
|
||||
- name: puppetmaster
|
||||
image: 9d25fe2d-cf31-4b05-8c58-f238ec78e633
|
||||
|
@ -2,9 +2,10 @@
|
||||
- name: Create keypairs
|
||||
os_keypair:
|
||||
state: present
|
||||
cloud: "{{item.os_client_config_cloud | default(os_client_config_cloud) }}"
|
||||
name: "{{ item.name }}"
|
||||
public_key: "{{ item.contents }}"
|
||||
cloud: "{{ item.os_client_config_cloud | default(os_client_config_cloud) }}"
|
||||
name: "{{ item.name | default(key_name) }}"
|
||||
public_key: "{{ item.public_key | default(omit) }}"
|
||||
public_key_file: "{{ item.public_key_file | default(omit) }}"
|
||||
validate_certs: "{{ os_validate_certs }}"
|
||||
with_items: keypairs
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user