From ce9b66f71b60857f644cc5a3559a5c21af5d9b24 Mon Sep 17 00:00:00 2001 From: tzumainn Date: Wed, 23 Aug 2017 09:58:07 -0400 Subject: 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 --- playbooks/provisioning/openstack/README.md | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/playbooks/provisioning/openstack/README.md b/playbooks/provisioning/openstack/README.md index 358ed182b..002c2f6aa 100644 --- a/playbooks/provisioning/openstack/README.md +++ b/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: -- cgit v1.2.3