瀏覽代碼

fix task names, add cleanup playbook

Grega Bremec 4 周之前
父節點
當前提交
a2e857ad26
共有 2 個文件被更改,包括 30 次插入2 次删除
  1. 28 0
      playbooks/apps-review-cleanup.yml
  2. 2 2
      playbooks/apps-review.yml

+ 28 - 0
playbooks/apps-review-cleanup.yml

@@ -0,0 +1,28 @@
+# Remove the apps-review projects.
+- name: Clean up the exercise of apps-review.
+  hosts: localhost
+  gather_subset: min
+  become: no
+  tasks:
+    - name: Prereqs
+      include_role:
+        name: check-env
+
+    - name: Ensure the projects are there
+      kubernetes.core.k8s:
+        kubeconfig: tmp/kubeconfig-ocp4
+        validate_certs: no
+        api_version: v1
+        kind: namespace
+        name: "{{ item.name }}"
+        state: absent
+      loop:
+        - name: apps-selector-conflict
+          nodeselector: kubernetes.io/hostname=worker03
+        - name: apps-selector-impossible
+        - name: apps-lowquota
+        - name: apps-taint
+        - name: apps-antiaffinity
+        #- name: apps-lowlimit
+        - name: apps-pdb
+

+ 2 - 2
playbooks/apps-review.yml

@@ -1,5 +1,5 @@
 ---
-# Prepares the environment for the apps-placement exercise, and cleans up afterwards.
+# Prepares the environment for the apps-review exercise, and cleans up afterwards.
 #
 # TODO: create some projects:
 #          - one with a project node selector
@@ -32,7 +32,7 @@
 #      deploy an app w/requests, generate load, observe timing
 #          add HPA, generate load, compare
 #
-- name: Prepare (or clean up) the exercise of apps-placement.
+- name: Prepare the exercise of apps-review.
   hosts: localhost
   gather_subset: min
   become: no