Просмотр исходного кода

Install DNS roles from casl-infra with galaxy (#529)

Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
Bogdan Dobrelya 7 лет назад
Родитель
Сommit
25a2d4f772

+ 18 - 1
playbooks/provisioning/openstack/README.md

@@ -4,10 +4,10 @@ This repository contains playbooks and Heat templates to provision
 OpenStack resources (servers, networking, volumes, security groups,
 etc.). The result is an environment ready for openshift-ansible.
 
-
 ## Dependencies for localhost (ansible control/admin node)
 
 * [Ansible 2.3](https://pypi.python.org/pypi/ansible)
+* [Ansible-galaxy](https://pypi.python.org/pypi/ansible-galaxy-local-deps)
 * [jinja2](http://jinja.pocoo.org/docs/2.9/)
 * [shade](https://pypi.python.org/pypi/shade)
 * python-dns / [dnspython](https://pypi.python.org/pypi/dnspython)
@@ -19,6 +19,23 @@ There are no additional dependencies for the cluster nodes. Required
 configuration steps are done by Heat given a specific user data config
 that normally should not be changed.
 
+## Required galaxy modules
+
+In order to pull in external dependencies for DNS configuration steps,
+the following commads need to be executed:
+
+    ansible-galaxy install \
+      -r openshift-ansible-contrib/playbooks/provisioning/openstack/galaxy-requirements.yaml \
+      -p openshift-ansible-contrib/roles
+
+Alternatively you can install directly from github:
+
+    ansible-galaxy install git+https://github.com/redhat-cop/infra-ansible,master \
+      -p openshift-ansible-contrib/roles
+
+Note, this assumes we're in the directory that contains the clonned
+openshift-ansible-contrib repo in its root path.
+
 ## What does it do
 
 * Create Nova servers with floating IP addresses attached

+ 6 - 0
playbooks/provisioning/openstack/galaxy-requirements.yaml

@@ -0,0 +1,6 @@
+---
+# This is the Ansible Galaxy requirements file to pull in the correct roles
+
+# From 'infra-ansible'
+- src: https://github.com/redhat-cop/infra-ansible
+  version: master

+ 2 - 2
playbooks/provisioning/openstack/post-provision-openstack.yml

@@ -33,7 +33,7 @@
   - name: "Generate dns-server views"
     include: openstack_dns_views.yml
   roles:
-  - role: dns-server
+  - role: infra-ansible/roles/dns-server
 
 - name: Build and process DNS Records
   hosts: localhost
@@ -44,7 +44,7 @@
   - name: "Generate dns records"
     include: openstack_dns_records.yml
   roles:
-  - role: dns
+  - role: infra-ansible/roles/dns
 
 - name: Switch the stack subnet to the configured private DNS server
   hosts: localhost