Skip to content

Commit a843ae6

Browse files
committed
Added CIFS Share examples.
1 parent c8f9d4c commit a843ae6

4 files changed

Lines changed: 16 additions & 19 deletions

File tree

Infrastructure_as_Code/Ansible/Volume_Management/create_volume.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- volume_size
2323
- vserver
2424
- secret_name
25+
- fsxn_hostname
2526
#
2627
# Give default values to optional variables if they are not defined
2728
- name: Set security_style to unix if not provide.

Infrastructure_as_Code/Ansible/Volume_Management/create_volume_and_share.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- volume_size
2323
- vserver
2424
- secret_name
25+
- fsxn_hostname
2526
#
2627
# Give default values to optional variables if they are not defined
2728
- name: Set security_style to ntfs if not provide.

Infrastructure_as_Code/Ansible/Volume_Management/delete_volume_and_share.yaml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Title: create_volume_and_share.yaml
1+
# Title: delete_volume_and_share.yaml
22

33
---
4-
- name: Playbook to create a volume and a CIFS share that points to it on an FSx for ONTAP file system.
4+
- name: Playbook to delete a volume and a CIFS share that points to it on an FSx for ONTAP file system.
55
hosts: localhost
66
collections:
77
- netapp.ontap
@@ -19,9 +19,9 @@
1919
when: vars[item] is undefined
2020
loop:
2121
- volume_name
22-
- volume_size
2322
- vserver
2423
- secret_name
24+
- fsxn_hostname
2525
#
2626
# Give default values to optional variables if they are not defined
2727
- name: Set security_style to ntfs if not provide.
@@ -80,33 +80,28 @@
8080
password: "{{ lookup('amazon.aws.aws_secret', '{{ secret_name }}.password', nested=true) }}"
8181
no_log: true
8282

83-
- name: Create the volume
84-
netapp.ontap.na_ontap_volume:
83+
- name: Delete CIFS Share
84+
netapp.ontap.na_ontap_cifs:
8585
state: absent
86-
name: "{{ volume_name }}"
87-
size: "{{ volume_size }}"
86+
name: "{{ share_name }}"
87+
path: "{{ junction_path }}"
8888
vserver: "{{ vserver }}"
89-
aggregate_name: "{{ aggr }}"
90-
junction_path: "{{ junction_path }}"
91-
volume_security_style: "{{ security_style }}"
9289
use_lambda: "{{ use_lambda }}"
9390
lambda_config:
9491
aws_profile: "{{ aws_profile }}"
9592
aws_region: "{{ aws_region }}"
9693
function_name: "{{ lambda_function_name }}"
97-
type: "{{ volume_type }}"
98-
size_unit: "mb"
9994
hostname: "{{ fsxn_hostname }}"
10095
username: "{{ username }}"
10196
password: "{{ password }}"
10297
validate_certs: false
10398

104-
- name: Create CIFS Share
105-
netapp.ontap.na_ontap_cifs:
99+
- name: Delete the volume
100+
netapp.ontap.na_ontap_volume:
106101
state: absent
107-
name: "{{ share_name }}"
108-
path: "{{ junction_path }}"
102+
name: "{{ volume_name }}"
109103
vserver: "{{ vserver }}"
104+
aggregate_name: "{{ aggr }}"
110105
use_lambda: "{{ use_lambda }}"
111106
lambda_config:
112107
aws_profile: "{{ aws_profile }}"

Infrastructure_as_Code/Terraform/Miscellaneous/create_cifs_share.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ resource "netapp-ontap_cifs_share" "cifs_share" {
122122
svm_name = data.aws_fsx_ontap_storage_virtual_machine.svm.name
123123
acls = [
124124
{
125-
"permission": "full_control",
126-
"user_or_group": "Everyone",
127-
"type": "windows"
125+
permission = "full_control"
126+
user_or_group = "Everyone"
127+
type = "windows"
128128
}
129129
]
130130
depends_on = [

0 commit comments

Comments
 (0)