openrc file resource

This commit is contained in:
Łukasz Oleś 2015-06-02 15:09:52 +00:00
parent 53c19bbd91
commit 1f3254aac5
4 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,5 @@
- hosts: [ {{ ip }} ]
sudo: yes
tasks:
- file: path=/root/openrc state=absent

View 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

View 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:

View 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'