Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 8 additions & 24 deletions ansible/cifs_provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@
hosts: ontap
gather_facts: false
connection: local
module_defaults:
group/netapp.ontap.netapp_ontap:
hostname: "{{ ontap_hostname }}"
username: "{{ ontap_username }}"
password: "{{ ontap_password }}"
https: "{{ ontap_https }}"
validate_certs: "{{ ontap_validate_certs }}"
use_rest: always

tasks:
# -- Step 1: Create FlexVol with NTFS security style ----------------
- name: Create volume '{{ volume_name }}' with NTFS security style

Check failure on line 26 in ansible/cifs_provision.yml

View workflow job for this annotation

GitHub Actions / Ansible — syntax & lint

name[template]

Jinja templates should only be at the end of 'name'

Check warning on line 26 in ansible/cifs_provision.yml

View workflow job for this annotation

GitHub Actions / Ansible — syntax & lint

args[module]

missing required arguments: hostname
netapp.ontap.na_ontap_volume:
hostname: "{{ ontap_hostname }}"
username: "{{ ontap_username }}"
password: "{{ ontap_password }}"
https: "{{ ontap_https }}"
validate_certs: "{{ ontap_validate_certs }}"
use_rest: always
state: present
name: "{{ volume_name }}"
vserver: "{{ svm_name }}"
Expand All @@ -35,14 +37,8 @@
no_log: false

# -- Step 2: Create CIFS share on the volume ------------------------
- name: Create CIFS share '{{ share_name }}'

Check warning on line 40 in ansible/cifs_provision.yml

View workflow job for this annotation

GitHub Actions / Ansible — syntax & lint

args[module]

missing required arguments: hostname
netapp.ontap.na_ontap_cifs:
hostname: "{{ ontap_hostname }}"
username: "{{ ontap_username }}"
password: "{{ ontap_password }}"
https: "{{ ontap_https }}"
validate_certs: "{{ ontap_validate_certs }}"
use_rest: always
state: present
share_name: "{{ share_name }}"
path: "/{{ volume_name }}"
Expand All @@ -51,14 +47,8 @@
no_log: false

# -- Step 3: Set share ACL ------------------------------------------
- name: Set ACL — '{{ acl_user }}' → {{ acl_permission }}

Check failure on line 50 in ansible/cifs_provision.yml

View workflow job for this annotation

GitHub Actions / Ansible — syntax & lint

name[template]

Jinja templates should only be at the end of 'name'

Check warning on line 50 in ansible/cifs_provision.yml

View workflow job for this annotation

GitHub Actions / Ansible — syntax & lint

args[module]

missing required arguments: hostname
netapp.ontap.na_ontap_cifs_acl:
hostname: "{{ ontap_hostname }}"
username: "{{ ontap_username }}"
password: "{{ ontap_password }}"
https: "{{ ontap_https }}"
validate_certs: "{{ ontap_validate_certs }}"
use_rest: always
state: present
share_name: "{{ share_name }}"
vserver: "{{ svm_name }}"
Expand All @@ -67,14 +57,8 @@
no_log: false

# -- Step 4: Verify share exists ------------------------------------
- name: Verify CIFS share '{{ share_name }}'

Check warning on line 60 in ansible/cifs_provision.yml

View workflow job for this annotation

GitHub Actions / Ansible — syntax & lint

args[module]

missing required arguments: hostname
netapp.ontap.na_ontap_rest_info:
hostname: "{{ ontap_hostname }}"
username: "{{ ontap_username }}"
password: "{{ ontap_password }}"
https: "{{ ontap_https }}"
validate_certs: "{{ ontap_validate_certs }}"
use_rest: always
gather_subset:
- protocols/cifs/shares
parameters:
Expand Down
32 changes: 8 additions & 24 deletions ansible/nfs_provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,22 @@
hosts: ontap
gather_facts: false
connection: local
module_defaults:
group/netapp.ontap.netapp_ontap:
hostname: "{{ ontap_hostname }}"
username: "{{ ontap_username }}"
password: "{{ ontap_password }}"
https: "{{ ontap_https }}"
validate_certs: "{{ ontap_validate_certs }}"
use_rest: always

vars:
export_policy_name: "{{ volume_name }}_export_policy"

tasks:
# -- Step 1: Create the FlexVol volume ------------------------------
- name: Create volume '{{ volume_name }}'

Check warning on line 29 in ansible/nfs_provision.yml

View workflow job for this annotation

GitHub Actions / Ansible — syntax & lint

args[module]

missing required arguments: hostname
netapp.ontap.na_ontap_volume:
hostname: "{{ ontap_hostname }}"
username: "{{ ontap_username }}"
password: "{{ ontap_password }}"
https: "{{ ontap_https }}"
validate_certs: "{{ ontap_validate_certs }}"
use_rest: always
state: present
name: "{{ volume_name }}"
vserver: "{{ svm_name }}"
Expand All @@ -37,28 +39,16 @@
no_log: false

# -- Step 2: Create a dedicated NFS export policy -------------------
- name: Create export policy '{{ export_policy_name }}'

Check warning on line 42 in ansible/nfs_provision.yml

View workflow job for this annotation

GitHub Actions / Ansible — syntax & lint

args[module]

missing required arguments: hostname
netapp.ontap.na_ontap_export_policy:
hostname: "{{ ontap_hostname }}"
username: "{{ ontap_username }}"
password: "{{ ontap_password }}"
https: "{{ ontap_https }}"
validate_certs: "{{ ontap_validate_certs }}"
use_rest: always
state: present
name: "{{ export_policy_name }}"
vserver: "{{ svm_name }}"
no_log: false

# -- Step 3: Add a client-match rule to the policy ------------------
- name: Add client rule '{{ client_match }}' to export policy

Check failure on line 50 in ansible/nfs_provision.yml

View workflow job for this annotation

GitHub Actions / Ansible — syntax & lint

name[template]

Jinja templates should only be at the end of 'name'

Check warning on line 50 in ansible/nfs_provision.yml

View workflow job for this annotation

GitHub Actions / Ansible — syntax & lint

args[module]

missing required arguments: hostname
netapp.ontap.na_ontap_export_policy_rule:
hostname: "{{ ontap_hostname }}"
username: "{{ ontap_username }}"
password: "{{ ontap_password }}"
https: "{{ ontap_https }}"
validate_certs: "{{ ontap_validate_certs }}"
use_rest: always
state: present
policy_name: "{{ export_policy_name }}"
vserver: "{{ svm_name }}"
Expand All @@ -70,14 +60,8 @@
no_log: false

# -- Step 4: Assign the export policy to the volume -----------------
- name: Assign export policy to volume '{{ volume_name }}'

Check warning on line 63 in ansible/nfs_provision.yml

View workflow job for this annotation

GitHub Actions / Ansible — syntax & lint

args[module]

missing required arguments: hostname
netapp.ontap.na_ontap_volume:
hostname: "{{ ontap_hostname }}"
username: "{{ ontap_username }}"
password: "{{ ontap_password }}"
https: "{{ ontap_https }}"
validate_certs: "{{ ontap_validate_certs }}"
use_rest: always
state: present
name: "{{ volume_name }}"
vserver: "{{ svm_name }}"
Expand Down
Loading