Files
windows-ansible/ansible/roles/win_transfer/tasks/mount.yml
T

29 lines
793 B
YAML

---
- name: Setup Mount
tags: setup_mount
block:
- name: Create the mount point
file:
path: "{{ mount_directory }}"
state: directory
mode: "0770"
owner: sg-transfer
group: sg-transfer
- name: Copy smb-credential template to os-transfer
template:
dest: "{{ credentials_path }}"
src: smb-credentials.j2
delegate_to: os-transfer
- name: Mount Filesystem
tags: mount_filesystem
block:
- name: Mount filesystem on os-transfer
ansible.posix.mount:
src: "//{{ hostvars[inventory_hostname].ansible_host }}/File_Transfer"
path: "{{ mount_directory }}"
opts: "credentials={{ credentials_path }},iocharset=utf8"
state: mounted
fstype: cifs
delegate_to: os-transfer