mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-30 19:30:15 +00:00
Rework win_tranfer to role from playbook
This commit is contained in:
1 parent
c9b47832e5
commit
a911929a5c
6 files changed
+44
-56
No files matched your search
@@ -0,0 +1,2 @@
|
||||
---
|
||||
- import_tasks: mount.yml
|
||||
@@ -0,0 +1,29 @@
|
||||
---
|
||||
- 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
|
||||
Reference in new issue
Block a user