blob: f9359ab44687c6e6722c0a3e0f272e08c96b9ca4 [file] [log] [blame]
Mohammed Naser3f961782023-04-20 10:48:21 -04001# Copyright (c) 2023 VEXXHOST, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
15- ansible.builtin.import_playbook: vexxhost.ceph.destroy_fake_devices
16
17- hosts: localhost
18 connection: local
19 gather_facts: false
20 no_log: "{{ molecule_no_log }}"
21 vars:
22 workspace_path: "{{ lookup('env', 'MOLECULE_SCENARIO_DIRECTORY') }}"
23 tasks:
24 - name: Capture var files to delete
25 find:
26 paths:
27 - "{{ workspace_path }}/group_vars"
28 - "{{ workspace_path }}/host_vars"
29 file_type: file
30 recurse: true
31 excludes:
32 - "molecule.yml"
33 register: _var_files
34
35 - name: Delete var files
36 file:
37 path: "{{ item.path }}"
38 state: absent
39 with_items: "{{ _var_files['files'] }}"