Skip to content

Commit 22adb5a

Browse files
Jenkinseshulman2
authored andcommitted
Ensure that namespace is created
By default baremetals are created in openshift-machine-api. But we need to use openstack namespace instead. See the following jira: https://issues.redhat.com/browse/OSPRH-16805 There is an issue when using openstack namespace, it is not created when baremetals playbooks are executed. With this commit I ensure that namespace is created before it is needed
1 parent d6459d5 commit 22adb5a

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

roles/deploy_bmh/tasks/create_templated_resource.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@
2020
dest: "{{ _manifest_file }}"
2121
mode: "0644"
2222

23+
- name: Ensure cifmw_deploy_bmh_namespace namespace exists
24+
when:
25+
- cifmw_deploy_bmh_apply_cr
26+
kubernetes.core.k8s:
27+
kubeconfig: "{{ cifmw_openshift_kubeconfig }}"
28+
state: present
29+
definition:
30+
apiVersion: v1
31+
kind: Namespace
32+
metadata:
33+
name: "{{ cifmw_deploy_bmh_namespace }}"
34+
2335
- name: Apply the generated CRs
2436
when:
2537
- cifmw_deploy_bmh_apply_cr

0 commit comments

Comments
 (0)