https://github.com/stackhpc/ansible-role-os-config
Ansible role to inject OpenStack client configuration
https://github.com/stackhpc/ansible-role-os-config
Last synced: 2 months ago
JSON representation
Ansible role to inject OpenStack client configuration
- Host: GitHub
- URL: https://github.com/stackhpc/ansible-role-os-config
- Owner: stackhpc
- License: apache-2.0
- Created: 2017-11-22T16:21:13.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-11-24T11:21:26.000Z (over 2 years ago)
- Last Synced: 2024-04-14T22:50:17.415Z (over 2 years ago)
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
stackhpc.os-config
==================
[](https://www.travis-ci.org/stackhpc/ansible-role-os-config)
Add openstack client config file to default location of
`/etc/openstack/clouds.yaml`
Requirements
------------
No requirements beyond installing Ansible.
Role Variables
--------------
`os_config_content` is a string that is written out into the config file.
Its often best setting that as an inline vault variable.
`os_config_destination` is the directory where the configuration is written.
This defaults to the home directory of the ansible user, but another common
location is "/etc/openstack".
Dependencies
------------
There are no requirements for any other Ansible roles.
Example Playbook
----------------
While you probably want to use and inline vault variable, here is a nice
example of using this role in a playbook:
---
- hosts: all
vars:
ansible_become: yes
my_cloud_config: |
---
clouds:
mycloud:
auth:
auth_url: http://openstack.example.com:5000
project_name: p3
username: user
password: secretpassword
region: RegionOne
roles:
- role: stackhpc.os-config
os_config_content: "{{ my_cloud_config }}"
os_config_destination: "/etc/openstack"
os_config_owner: root
os_config_group: root
An easy way to this example is:
sudo yum install python-virtualenv libselinux-python
virtualenv .venv --system-site-packages
. .venv/bin/activate
pip install -U pip
pip install -U ansible
ansible-galaxy install stackhpc.os-config
ansible-playbook -i "localhost," -c local test.yml
License
-------
Apache 2
Author Information
------------------
http://www.stackhpc.com