openrc file resource
This commit is contained in:
parent
53c19bbd91
commit
1f3254aac5
5
resources/openrc_file/actions/remove.yaml
Normal file
5
resources/openrc_file/actions/remove.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
- hosts: [ {{ ip }} ]
|
||||
sudo: yes
|
||||
tasks:
|
||||
- file: path=/root/openrc state=absent
|
||||
|
10
resources/openrc_file/actions/run.yaml
Normal file
10
resources/openrc_file/actions/run.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
- hosts: [{{ ip }}]
|
||||
sudo: yes
|
||||
vars:
|
||||
tenant: {{tenant}}
|
||||
user_name: {{user_name}}
|
||||
password: {{password}}
|
||||
keystone_host: {{keystone_host}}
|
||||
keystone_port: {{keystone_port}}
|
||||
tasks:
|
||||
- template: src={{resource_dir}}/templates/openrc.template dest=/root/openrc
|
29
resources/openrc_file/meta.yaml
Normal file
29
resources/openrc_file/meta.yaml
Normal file
@ -0,0 +1,29 @@
|
||||
id: nova_config
|
||||
handler: ansible
|
||||
version: 1.0.0
|
||||
|
||||
input:
|
||||
keystone_host:
|
||||
schema: str!
|
||||
value:
|
||||
keystone_port:
|
||||
schema: int!
|
||||
value:
|
||||
tenant:
|
||||
schema: str!
|
||||
value:
|
||||
user_name:
|
||||
schema: str!
|
||||
value:
|
||||
password:
|
||||
schema: str!
|
||||
value:
|
||||
ip:
|
||||
schema: str!
|
||||
value:
|
||||
ssh_key:
|
||||
schema: str!
|
||||
value:
|
||||
ssh_user:
|
||||
schema: str!
|
||||
value:
|
9
resources/openrc_file/templates/openrc.template
Normal file
9
resources/openrc_file/templates/openrc.template
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
export LC_ALL=C
|
||||
export OS_NO_CACHE="true"
|
||||
export OS_TENANT_NAME={{tenant}}
|
||||
export OS_USERNAME={{user_name}}
|
||||
export OS_PASSWORD={{password}}
|
||||
export OS_AUTH_URL=http://{{keystone_host}}:{{keystone_port}}/v2.0
|
||||
export OS_AUTH_STRATEGY=keystone
|
||||
export OS_REGION_NAME='RegionOne'
|
Loading…
x
Reference in New Issue
Block a user