Skip to content

Instantly share code, notes, and snippets.

@odyssey4me odyssey4me/ansible.cfg
Last active Mar 27, 2019

Embed
What would you like to do?
Ansible/OpenStack configuration
# In ~/.ansible.cfg
[defaults]
inventory = ~/.ansible/inventory
retry_files_enabled = False
#stdout_callback = yaml
bin_ansible_callbacks = True
[inventory]
enable_plugins = ini, openstack
cache_connection = /tmp/ansible_fact_cache
# In ~/.config/openstack/clouds.yaml
clouds:
rax-user-password:
profile: rackspace
regions:
- IAD
- DFW
- ORD
auth:
username: "<your username here>"
password: "<your password here>" # note, this is not the auth key, it's the password you enter into the browser
project_id: "<your project id here>"
# for the rackspace_apikey auth type to work, you must
# pip install rackspaceauth
rax-apikey:
profile: rackspace
auth_type: rackspace_apikey
regions:
- IAD
- DFW
- ORD
auth:
username: "<your username here>"
api_key: "<your api key here>"
# this is for doing auth against an openstack
# environment that has no os-client-config profile
openstack:
auth:
auth_url: "https://mycloud:5000/v3"
project_name: "<your project name here>"
project_id: "<your project id here>"
username: "<your username here>"
password: "<your password here>"
user_domain_name: "Default"
region_name: "RegionOne"
interface: "public"
identity_api_version: "3"
# set this if you're using a self-signed cert
verify: False
# this is useful if you're using the openstack
# dynamic inventory for ansible
ansible:
use_hostnames: True
expand_hostvars: False
fail_on_errors: True
# In ~/.ansible/inventory/openstack.yml
plugin: openstack
# the cache is only required until https://github.com/ansible/ansible/commit/8490588afa246f32d7e697df4a3e37f1c8761baf
# or https://github.com/ansible/ansible/commit/a47671aad12f3527902424a81075ca31a43fef6a is in the current release
cache: yes
cache_plugin: yaml
fail_on_errors: no
only_clouds:
- openstack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.