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:
parent
f122367c34
commit
b4368593fe
3 changed files with 15 additions and 7 deletions
|
@ -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']}}"
|
||||
|
|
9
roles/communishift/tasks/create-group.yml
Normal file
9
roles/communishift/tasks/create-group.yml
Normal 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
|
|
@ -6,5 +6,5 @@
|
|||
run_once: true
|
||||
|
||||
- include_tasks: create-namespace.yml
|
||||
- include_tasks: create-group.yml
|
||||
- include_tasks: create-efs.yml
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue