diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:35 +0000 |
commit | 7fec0b69a082aaeec72fee0612766aa42f6b1b4d (patch) | |
tree | efb569b86ca4da888717f5433e757145fa322e08 /ansible_collections/dellemc/unity/playbooks/modules/cifsserver.yml | |
parent | Releasing progress-linux version 7.7.0+dfsg-3~progress7.99u1. (diff) | |
download | ansible-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.yml | 151 |
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" |