-
Notifications
You must be signed in to change notification settings - Fork 0
/
09_talus_bestehenden_share_loeschen.yml
50 lines (45 loc) · 2.03 KB
/
09_talus_bestehenden_share_loeschen.yml
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
#!/usr/bin/env ansible-playbook
#******************************************************************************
# Applikation: Storage-Admin
# ScriptName: 08_talus_neuen_share_einrichten.yml
# Version: 1.0
# Typ: ansible YAML playbook
# Beschreibung: YAML Playbook Template to start new OnTap Module
# based ansible-playbooks
# Author: Horst Pauli Proffessional Services Consultant
#
# Target Systems: LINUX Server/VM used as Ansible Host at Customer Site
#
# (C) Copyright NetApp Switzerland 2020
#******************************************************************************
# Modifications: 01/03/2021 Initial Version # H. Pauli ***
# xx/xx/xxxx comment # Author ***
#******************************************************************************
- hosts: localhost
gather_facts: false
vars:
input: &input
hostname: "{{ PRI_CLU }}"
username: "{{ PRI_CLU_USER }}"
password: "{{ PRI_CLU_PASS }}"
https: true
validate_certs: false
vars_files:
- global.vars
collections:
- netapp.ontap
tasks:
- name: Automaticaly choose the right Vservername
set_fact:
vservername: "{% if hostname=='tacluster01' %}svm_ta_cifs{% elif hostname=='tbcluster01'%}svm_tb_cifs{% else %}svm_cifs01{% endif %}"
- name: Delete Windows Share {{ sharename }} on vserver {{ vservername }}
na_ontap_cifs:
state: absent
hostname: "{{ hostname }}"
username: "{{ PRI_CLU_USER }}"
password: "{{ PRI_CLU_PASS }}"
share_name: "{{ sharename }}"
#path: "{{ pathname }}"
vserver: "{{ vservername }}"
share_properties: browsable,changenotify,oplocks,show-previous-versions,showsnapshot
symlink_properties: enable