fcos-pipeline-migration: install oc-client.rpm

Signed-off-by: David Kirwan <dkirwan@redhat.com>
This commit is contained in:
David Kirwan 2021-11-09 10:35:57 +00:00
parent 5468485195
commit c3e206ab1e
7 changed files with 78 additions and 0 deletions

View file

@ -0,0 +1,16 @@
---
- hosts: os_control_stg:os_control
gather_facts: false
roles:
- role: openshift/sysadmin-openshift
appowners:
- mobrien
- siddharthvipul1
- kevin
- dkirwan
- jrichardson
- scoady
- lenkaseg
- asaleh
- t0xic0der

View file

@ -0,0 +1,4 @@
appowners: []
project_templates:
- group.yaml
- rolebinding.yaml

View file

@ -0,0 +1,3 @@
- import_tasks: resources.yaml
- import_tasks: upgrade.yaml

View file

@ -0,0 +1,28 @@
- name: Create the directories to hold the templates
file:
path: "/root/ocp4/openshift-apps/"
state: directory
owner: root
group: root
mode: 0770
recurse: yes
tags:
- create-resources
# generate the templates for project to be created
- name: create the templates
template:
src: "{{ item }}"
dest: "/root/ocp4/openshift-apps/{{ item }}"
mode: 0770
with_items: "{{ project_templates }}"
tags:
- create-resources
# apply created openshift resources
- name: oc apply resources
command: "/root/bin/oc apply -f /root/ocp4/openshift-apps/{{ item }}"
with_items: "{{ project_templates }}"
tags:
- create-resources

View file

@ -0,0 +1,7 @@
- name: Install oc-client.prm package.
yum:
name: /srv/web/infra/bigfiles/openshiftboot/oc-client/oc-client.rpm
state: present
delegate_to: 127.0.0.1
tags:
- upgrade-rpm

View file

@ -0,0 +1,8 @@
kind: Group
apiVersion: user.openshift.io/v1
metadata:
name: "sysadmin-openshift"
users:
{% for item in appowners %}
- "{{ item }}"
{% endfor %}

View file

@ -0,0 +1,12 @@
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: "sysadmin-openshift"
subjects:
- kind: Group
apiGroup: rbac.authorization.k8s.io
name: "sysadmin-openshift"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin