summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Coca <bcoca@ansible.com>2015-03-06 11:45:07 -0500
committerBrian Coca <bcoca@ansible.com>2015-03-06 11:45:07 -0500
commitfb717ffd6c6afece578241fd43dce02e3287fab5 (patch)
tree2144de1b8aa81f5235cf65ea9c2d39c3fd7a8465
parenta68ca90a00ce7f21f4b2f9b961b508f356c1661e (diff)
parent57c81dfcf7146597b8539a79be16fa03b932cc25 (diff)
downloadansible-fb717ffd6c6afece578241fd43dce02e3287fab5.tar.gz
Merge pull request #10345 from emonty/features/openstack-inventory-docs
Add documentation for the new OpenStack Inventory
-rwxr-xr-xplugins/inventory/openstack.py16
-rw-r--r--plugins/inventory/openstack.yml28
2 files changed, 44 insertions, 0 deletions
diff --git a/plugins/inventory/openstack.py b/plugins/inventory/openstack.py
index c49d3c1fc4..92a81ac0e9 100755
--- a/plugins/inventory/openstack.py
+++ b/plugins/inventory/openstack.py
@@ -17,6 +17,22 @@
# You should have received a copy of the GNU General Public License
# along with this software. If not, see <http://www.gnu.org/licenses/>.
+# The OpenStack Inventory module uses os-client-config for configuation.
+# https://github.com/stackforge/os-client-config
+# This means it will either:
+# - Respect normal OS_* environment variables like other OpenStack tools
+# - Read values from a clouds.yaml file.
+# If you want to configure via clouds.yaml, you can put the file in:
+# - Current directory
+# - ~/.config/openstack/clouds.yaml
+# - /etc/openstack/clouds.yaml
+# - /etc/ansible/openstack.yml
+# The clouds.yaml file can contain entries for multiple clouds and multiple
+# regions of those clouds. If it does, this inventory module will connect to
+# all of them and present them as one contiguous inventory.
+#
+# See the adjacent openstack.yml file for an example config file
+
import argparse
import collections
import os
diff --git a/plugins/inventory/openstack.yml b/plugins/inventory/openstack.yml
new file mode 100644
index 0000000000..a99bb02058
--- /dev/null
+++ b/plugins/inventory/openstack.yml
@@ -0,0 +1,28 @@
+clouds:
+ mordred:
+ cloud: hp
+ auth:
+ username: mordred@example.com
+ password: my-wonderful-password
+ project_name: mordred-tenant
+ region_name: region-b.geo-1
+ monty:
+ cloud: hp
+ auth:
+ username: monty.taylor@example.com
+ password: another-wonderful-password
+ project_name: monty.taylor@example.com-default-tenant
+ region_name: region-b.geo-1
+ rax:
+ cloud: rackspace
+ auth:
+ username: example
+ password: spectacular-password
+ project_id: 2352426
+ region_name: DFW,ORD,IAD
+ devstack:
+ auth:
+ auth_url: http://127.0.0.1:35357/v2.0/
+ username: stack
+ password: stack
+ project_name: stack