Browse Source

Add documentation regarding running custom post-provision tasks (#678)

* Add documentation regarding running custom post-provision tasks

* moved post-provision doc to openstack README

* added reference to OSEv3, clarified some text
tzumainn 7 years ago
parent
commit
ce9b66f71b
1 changed files with 38 additions and 0 deletions
  1. 38 0
      playbooks/provisioning/openstack/README.md

+ 38 - 0
playbooks/provisioning/openstack/README.md

@@ -271,6 +271,44 @@ The first infra node then becomes a bastion node as well and proxies access
 for future ansible commands. The post-provision step also configures Satellite,
 if requested, and DNS server, and ensures other OpenShift requirements to be met.
 
+### Running Custom Post-Provision Actions
+
+If you'd like to run post-provision actions, you can do so by creating a custom playbook. Here's one example that adds additional YUM repositories:
+
+```
+---
+- hosts: app
+  tasks:
+
+  # enable EPL
+  - name: Add repository
+    yum_repository:
+      name: epel
+      description: EPEL YUM repo
+      baseurl: https://download.fedoraproject.org/pub/epel/$releasever/$basearch/
+```
+
+This example runs against app nodes. The list of options include:
+
+  - cluster_hosts (all hosts: app, infra, masters, dns, lb)
+  - OSEv3 (app, infra, masters)
+  - app
+  - dns
+  - masters
+  - infra_hosts
+
+After writing your custom playbook, run it like this:
+
+```
+ansible-playbook --private-key ~/.ssh/openshift -i myinventory/ custom-playbook.yaml
+```
+
+If you'd like to limit the run to one particular host, you can do so as follows:
+
+```
+ansible-playbook --private-key ~/.ssh/openshift -i myinventory/ custom-playbook.yaml -l app-node-0.openshift.example.com
+```
+
 ### Install OpenShift
 
 Once it succeeds, you can install openshift by running: