add option to mount disks
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
89a8fba5ba
commit
409d76099f
|
@ -6,6 +6,12 @@ pve_tls_cert_source: mycert.pem
|
|||
pve_tls_key_source: mykey.pem
|
||||
|
||||
pve_pamd_motd_enabled: True
|
||||
# pve_disk_mount: # defaults to not set
|
||||
# - path: /mnt/backup
|
||||
# src: /dev/sdX
|
||||
# fstype: ext4
|
||||
# opts:
|
||||
# state: present
|
||||
|
||||
pve_nginx_vhost_enabled: False
|
||||
pve_server_name: pve.example.com
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
- import_tasks: pve.yml
|
||||
- import_tasks: pam.yml
|
||||
- import_tasks: auth.yml
|
||||
- import_tasks: tls.yml
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
- block:
|
||||
- name: Ensure mountpoints are present
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
recurse: yes
|
||||
state: directory
|
||||
loop: "{{ pve_disk_mount | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
|
||||
- name: Add diskmounts to fstab
|
||||
mount:
|
||||
path: "{{ item.path }}"
|
||||
src: "{{ item.src }}"
|
||||
fstype: "{{ item.fstype }}"
|
||||
opts: "{{ item.opts | default(omit) }}"
|
||||
state: "{{ item.state | default('present') }}"
|
||||
loop: "{{ pve_disk_mount | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.src }} {{ item.path }}"
|
||||
become: True
|
||||
become_user: root
|
Loading…
Reference in New Issue