summaryrefslogtreecommitdiffstats
path: root/ansible_collections/dellemc/unity/playbooks/modules/cifsserver.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-18 05:52:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-18 05:52:35 +0000
commit7fec0b69a082aaeec72fee0612766aa42f6b1b4d (patch)
treeefb569b86ca4da888717f5433e757145fa322e08 /ansible_collections/dellemc/unity/playbooks/modules/cifsserver.yml
parentReleasing progress-linux version 7.7.0+dfsg-3~progress7.99u1. (diff)
downloadansible-7fec0b69a082aaeec72fee0612766aa42f6b1b4d.tar.xz
ansible-7fec0b69a082aaeec72fee0612766aa42f6b1b4d.zip
Merging upstream version 9.4.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/dellemc/unity/playbooks/modules/cifsserver.yml')
-rw-r--r--ansible_collections/dellemc/unity/playbooks/modules/cifsserver.yml151
1 files changed, 151 insertions, 0 deletions
diff --git a/ansible_collections/dellemc/unity/playbooks/modules/cifsserver.yml b/ansible_collections/dellemc/unity/playbooks/modules/cifsserver.yml
new file mode 100644
index 000000000..ee2f980f8
--- /dev/null
+++ b/ansible_collections/dellemc/unity/playbooks/modules/cifsserver.yml
@@ -0,0 +1,151 @@
+---
+- name: CIFS Server Operations
+ hosts: localhost
+ connection: local
+ gather_facts: false
+ vars:
+ unispherehost: '10.*.*.*'
+ validate_certs: false
+ username: 'user'
+ password: '***'
+ domain_username: 'domain_user'
+ domain_password: '**'
+
+ tasks:
+ - name: Create standalone CIFS server with check mode
+ dellemc.unity.cifsserver:
+ unispherehost: "{{ unispherehost }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: "{{ validate_certs }}"
+ netbios_name: "ansible_cifs"
+ workgroup: "ansible"
+ local_password: "**"
+ nas_server_name: "Ansible_server_1"
+ state: "present"
+ check_mode: true
+
+ - name: Create standalone CIFS server
+ register: result
+ dellemc.unity.cifsserver:
+ unispherehost: "{{ unispherehost }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: "{{ validate_certs }}"
+ netbios_name: "ansible_cifs"
+ workgroup: "ansible"
+ local_password: "**"
+ nas_server_name: "Ansible_server_1"
+ state: "present"
+
+ - name: Create standalone CIFS server - Idempotency
+ register: result
+ dellemc.unity.cifsserver:
+ unispherehost: "{{ unispherehost }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: "{{ validate_certs }}"
+ netbios_name: "ansible_cifs"
+ workgroup: "ansible"
+ local_password: "**"
+ nas_server_name: "Ansible_server_1"
+ state: "present"
+
+ - name: Get CIFS server details
+ dellemc.unity.cifsserver:
+ unispherehost: "{{ unispherehost }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: "{{ validate_certs }}"
+ cifs_server_id: "{{ result.cifs_server_details.id }}"
+ state: "present"
+
+ - name: Get CIFS server details using NAS server name
+ dellemc.unity.cifsserver:
+ unispherehost: "{{ unispherehost }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: "{{ validate_certs }}"
+ nas_server_name: "Ansible_server_1"
+ state: "present"
+
+ - name: Get CIFS server details using NAS server ID
+ dellemc.unity.cifsserver:
+ unispherehost: "{{ unispherehost }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: "{{ validate_certs }}"
+ nas_server_id: "{{ result.cifs_server_details.nas_server.UnityNasServer.id }}"
+ state: "present"
+
+ - name: Delete CIFS server
+ dellemc.unity.cifsserver:
+ unispherehost: "{{ unispherehost }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: "{{ validate_certs }}"
+ cifs_server_id: "{{ result.cifs_server_details.id }}"
+ state: "absent"
+
+ - name: Create CIFS server belonging to Active Directory
+ dellemc.unity.cifsserver:
+ unispherehost: "{{ unispherehost }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: "{{ validate_certs }}"
+ nas_server_id: "nas_52"
+ cifs_server_name: "test_cifs_server"
+ domain: "test.lab.domain.com"
+ domain_username: "{{ domain_username }}"
+ domain_password: "{{ domain_password }}"
+ state: "present"
+
+ - name: Create CIFS server belonging to Active Directory - Idempotency
+ dellemc.unity.cifsserver:
+ unispherehost: "{{ unispherehost }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: "{{ validate_certs }}"
+ nas_server_id: "nas_52"
+ cifs_server_name: "test_cifs_server"
+ domain: "test.lab.domain.com"
+ domain_username: "{{ domain_username }}"
+ domain_password: "{{ domain_password }}"
+ state: "present"
+
+ - name: Delete CIFS server with check mode
+ dellemc.unity.cifsserver:
+ unispherehost: "{{ unispherehost }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: "{{ validate_certs }}"
+ cifs_server_name: "test_cifs_server"
+ unjoin_cifs_server_account: true
+ domain_username: "{{ domain_username }}"
+ domain_password: "{{ domain_password }}"
+ state: "absent"
+ check_mode: true
+
+ - name: Delete CIFS server
+ dellemc.unity.cifsserver:
+ unispherehost: "{{ unispherehost }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: "{{ validate_certs }}"
+ cifs_server_name: "test_cifs_server"
+ unjoin_cifs_server_account: true
+ domain_username: "{{ domain_username }}"
+ domain_password: "{{ domain_password }}"
+ state: "absent"
+
+ - name: Delete CIFS server - Idempotency
+ dellemc.unity.cifsserver:
+ unispherehost: "{{ unispherehost }}"
+ username: "{{ username }}"
+ password: "{{ password }}"
+ validate_certs: "{{ validate_certs }}"
+ cifs_server_name: "test_cifs_server"
+ unjoin_cifs_server_account: true
+ domain_username: "{{ domain_username }}"
+ domain_password: "{{ domain_password }}"
+ state: "absent"