summaryrefslogtreecommitdiffstats
path: root/roles/mount/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/mount/tasks/main.yml')
-rw-r--r--roles/mount/tasks/main.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/roles/mount/tasks/main.yml b/roles/mount/tasks/main.yml
new file mode 100644
index 00000000..65e40416
--- /dev/null
+++ b/roles/mount/tasks/main.yml
@@ -0,0 +1,18 @@
+---
+- name: "Create mount point"
+ become: true
+ ansible.builtin.file:
+ path: "{{ mount_point }}"
+ state: "directory"
+ owner: "root"
+ group: "root"
+ mode: "0755"
+
+- name: "Mount drive"
+ become: true
+ ansible.posix.mount:
+ path: "{{ mount_point }}"
+ src: "{{ mount_device }}"
+ fstype: "{{ mount_fstype }}"
+ opts: "{{ mount_options }}"
+ state: "mounted"