diff --git a/playbooks/post-install.yml b/playbooks/post-install.yml new file mode 100644 index 0000000..c5c4ada --- /dev/null +++ b/playbooks/post-install.yml @@ -0,0 +1,9 @@ +--- + + - name: Complete the OpenShift installation + hosts: lab + become: yes + tasks: + - name: Give admin rights to nicolas + command: oc adm policy add-cluster-role-to-user cluster-admin nicolas.masse@itix.fr + diff --git a/playbooks/preparation.yml b/playbooks/preparation.yml new file mode 100644 index 0000000..175b3bf --- /dev/null +++ b/playbooks/preparation.yml @@ -0,0 +1,10 @@ +--- + + - name: Prepare an "All-in-one" VM for OpenShift + hosts: lab + become: yes + roles: + - { name: 'base', tags: 'base' } + - { name: 'name-resolution', tags: 'name-resolution' } + - { name: 'docker', tags: 'docker' } + - { name: 'openshift-prereq', tags: 'openshift-prereq' } diff --git a/playbooks/site.yml b/playbooks/site.yml new file mode 100644 index 0000000..a9e5e35 --- /dev/null +++ b/playbooks/site.yml @@ -0,0 +1,10 @@ +--- + + - include: "switch-to-iptables.yml" + + - include: "preparation.yml" + + # Launch the OpenShift Installer Playbook + - include: "./openshift-ansible/playbooks/byo/config.yml" + + - include: "post-install.yml" diff --git a/playbooks/switch-to-iptables.yml b/playbooks/switch-to-iptables.yml new file mode 100644 index 0000000..600ef45 --- /dev/null +++ b/playbooks/switch-to-iptables.yml @@ -0,0 +1,15 @@ +--- + + - name: Switch to iptables + hosts: lab + become: yes + tasks: + - name: Install iptables-services + yum: name=iptables-services state=installed + tags: rpm + + - name: Disable firewalld + service: name=firewalld state=stopped enabled=no + + - name: Enable iptables + service: name=iptables state=started enabled=yes