homeserver/roles/mgrote.mount_cifs/tasks/main.yml
mg 44022ed0a8 bdfr + bugfixes (#115)
lock für script

log vars

doku

changed never

pool test

bdfr log

bdfr log

reboot cifs

mount

vars

aufräumen

download script

tasks

playbook

group vars

doku

eiegenes dataset archiv

keepass bfdr invalid

keepass: bfdr client id + client secret

upvoted saved and liked

Leerzeichen

sources bug

inventory

vars

vm test cv5pve

typo

Linux MInt fur Apt-Manage Sources

bdfr share

KeePassPW angepasst bdfr

playbook

bug cifs

bdfr

nutzer fileserver

Keepass: user bdfr

Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#115
Co-Authored-By: mg <mg@noreply.git.mgrote.net>
Co-Committed-By: mg <mg@noreply.git.mgrote.net>
2021-06-14 08:34:02 +02:00

41 lines
1 KiB
YAML

---
- name: install cifs-utils
become: yes
ansible.builtin.package:
name: cifs-utils
state: present
- name: create mount directory
become: yes
ansible.builtin.file:
path: "{{ item.dest }}"
state: directory
mode: 0777
loop: "{{ cifs_mounts }}"
no_log: true
- name: create credential-file
become: yes
ansible.builtin.template:
src: smb_passwords
dest: /root/.smb_passwords_{{ item.name }}
owner: root
group: root
mode: '0400'
loop: "{{ cifs_mounts }}"
no_log: true
- name: mount cifs volumes
become: yes
ansible.posix.mount:
src: "{{ item.src }}"
path: "{{ item.dest }}"
opts: credentials=/root/.smb_passwords_{{ item.name }},domain={{ item.domain }},uid={{ item.uid | default('1000') }},gid={{ item.gid | default('1000') }}"
state: "{{ item.state }}"
fstype: "{{ item.type }}"
backup: yes
dump: "0"
passno: "0"
loop: "{{ cifs_mounts }}"
no_log: true
notify: reboot