communishift: Added task for creating Openshift Group

Signed-off-by: David Kirwan <dkirwan@redhat.com>
Signed-off-by: Lenka Segura <lsegura@redhat.com>
Signed-off-by: Patrik Polakovic <ppolakov@redhat.com>
This commit is contained in:
Lenka Segura 2022-08-18 10:14:03 +02:00
parent f122367c34
commit b4368593fe
3 changed files with 15 additions and 7 deletions

View file

@ -11,7 +11,7 @@
communishift: "{{ communishift_project_name }}"
targets:
- subnet_id: "{{ communishift_subnet_id }}"
security_groups: [ "{{ communishift_security_group }}" ]
security_groups: ["{{ communishift_security_group }}"]
tags:
- create_efs
register: create_efs_filesystem_response
@ -26,7 +26,8 @@
aws_access_key_id: "{{ communishift_efs_access_key }}"
aws_secret_access_key: "{{ communishift_efs_secret_key }}"
aws_region: "{{ communishift_region }}"
aws_efs_filesystem_id: "{{ create_efs_filesystem_response['efs']['file_system_id'] }}"
aws_efs_filesystem_id: >-
{{create_efs_filesystem_response['efs']['file_system_id']}}
register: create_efs_accesspoint_response
ignore_errors: true
@ -36,7 +37,5 @@
- name: Store facts
set_fact:
accesspoint_id: "{{ create_efs_accesspoint_response['accesspoint_id'] }}"
filesystem_id: "{{ create_efs_filesystem_response['efs']['file_system_id'] }}"
accesspoint_id: "{{create_efs_accesspoint_response['accesspoint_id']}}"
filesystem_id: "{{create_efs_filesystem_response['efs']['file_system_id']}}"

View file

@ -0,0 +1,9 @@
---
- name: Create a k8s group
community.okd.k8s:
api_key: "{{ communishift_ocp_api_token }}"
host: "{{ communishift_ocp_api_host }}"
name: "{{ communishift_project_name }}-admins"
api_version: user.openshift.io/v1
kind: Group
state: present

View file

@ -6,5 +6,5 @@
run_once: true
- include_tasks: create-namespace.yml
- include_tasks: create-group.yml
- include_tasks: create-efs.yml