summaryrefslogtreecommitdiff
path: root/demo/ansible/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'demo/ansible/tasks')
-rw-r--r--demo/ansible/tasks/provision.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/demo/ansible/tasks/provision.yml b/demo/ansible/tasks/provision.yml
new file mode 100644
index 0000000..4d566a5
--- /dev/null
+++ b/demo/ansible/tasks/provision.yml
@@ -0,0 +1,18 @@
+---
+- hosts: provision
+ tasks:
+ - name: create vsys workload resource directory
+ file:
+ path: /opt/tsg/{{vsys.id}}/containerd/workload-resouce
+ state: directory
+
+ - name: Template the tsg-containerd-wr.yml
+ template:
+ src: "../templates/tsg-containerd-wr.yml.j2"
+ dest: /opt/tsg/{{vsys.id}}/containerd/workload-resouce/tsg-containerd-wr.yml
+
+ - name: Apply configmap
+ shell: kubectl create configmap {{vsys.id}}-provision-config --from-file provision.yml
+
+ - name: Apply tsg-containerd-wr.yml
+ shell: kubectl apply -f /opt/tsg/{{vsys.id}}/containerd/workload-resouce/tsg-containerd-wr.yml \ No newline at end of file