summaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/playbooks/configure-onap4k8s-reset.yml
blob: 6adaf2ee6601d8b5e30d5d64341da8afc2a8224a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2018
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

- hosts: kube-master
  tasks:
    - name: Load kud variables
      include_vars:
        file: kud-vars.yml

    - name: Change the onap4k8s directory and run helm delete
      command: /usr/local/bin/helm delete --purge multicloud-onap8ks
      register: helm_delete
      args:
        chdir: /opt/multicloud/deployments/helm/onap4k8s

    - debug:
        var: helm_delete.stdout_lines

    - name: Change the onap4k8s directory and delete the ona4k8s-ns namespace
      command: /usr/local/bin/kubectl delete ns onap4k8s-ns
      register: delete_onap_ns
      args:
        chdir: /opt/multicloud/deployments/helm/onap4k8s

    - debug:
        var: delete_onap_ns.stdout_lines

    - name: Change the onap4k8s directory and make clean
      command: /usr/bin/make clean
      register: make_clean
      args:
        chdir: /opt/multicloud/deployments/helm/onap4k8s

    - debug:
        var: make_clean.stdout_lines

    - name: Change the onap4k8s directory and make repo-stop
      command: /usr/bin/make repo-stop
      register: make_repo_stop
      args:
        chdir: /opt/multicloud/deployments/helm/onap4k8s

    - debug:
        var: make_repo_stop.stdout_lines

    - name: clean multicloud-k8s path
      file:
        state: absent
        path: /opt/multicloud