浏览代码

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 年之前
父节点
当前提交
ce9b66f71b
共有 1 个文件被更改,包括 38 次插入0 次删除
  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,
 for future ansible commands. The post-provision step also configures Satellite,
 if requested, and DNS server, and ensures other OpenShift requirements to be met.
 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
 ### Install OpenShift
 
 
 Once it succeeds, you can install openshift by running:
 Once it succeeds, you can install openshift by running: