Added ansible recipes for images, networks
authorSapan Bhatia <sapanb@cs.princeton.edu>
Fri, 19 Dec 2014 18:24:56 +0000 (13:24 -0500)
committerSapan Bhatia <sapanb@cs.princeton.edu>
Fri, 19 Dec 2014 18:24:56 +0000 (13:24 -0500)
planetstack/openstack_observer/steps/sync_controller_images.yaml [new file with mode: 0644]
planetstack/openstack_observer/steps/sync_controller_networks.yaml [new file with mode: 0644]

diff --git a/planetstack/openstack_observer/steps/sync_controller_images.yaml b/planetstack/openstack_observer/steps/sync_controller_images.yaml
new file mode 100644 (file)
index 0000000..55ad36a
--- /dev/null
@@ -0,0 +1,13 @@
+---
+- hosts: 127.0.0.1
+  connection: local 
+  tasks:
+  - glance:
+        auth_url: {{ endpoint }} 
+       username: {{ admin_user }}
+       tenant_name: 'admin'
+       password: {{ admin_password }}
+       name: {{ name }}
+        file: {{ filepath }}
+        format: 'raw'
+        is_public: true
diff --git a/planetstack/openstack_observer/steps/sync_controller_networks.yaml b/planetstack/openstack_observer/steps/sync_controller_networks.yaml
new file mode 100644 (file)
index 0000000..4f2daf4
--- /dev/null
@@ -0,0 +1,30 @@
+---
+- hosts: 127.0.0.1
+  connection: local 
+  tasks:
+  - quantum_network:
+       auth_url: {{ endpoint }} 
+       username: {{ admin_user }}
+       tenant_name: {{ tenant_name }}
+       password: {{ admin_password }}
+       name: {{ name }}
+       {% if delete %}
+       state: absent
+       {% else %}
+       state: present
+       {% endif %}
+        
+        shared: true
+  - quantum_subnet:
+       auth_url: {{ endpoint }} 
+       username: {{ admin_user }}
+       tenant_name: {{ tenant_name }}
+       password: {{ admin_password }}
+       name={{ subnet_name }} 
+        network_name={{ name }} 
+       {% if delete %}
+       state: absent
+       {% else %}
+       state=present 
+       cidr = {{ cidr }}
+       {% endif %}