fix 🐛: Enable snippets storage
This commit updates the PVE storage configuration to ensure the 'snippets' storage is properly enabled. It modifies the `/etc/pve/storage.cfg` file to include the 'snippets' option, resolving potential issues with snippet functionality. The IP address of the network interface has also been updated.
This commit is contained in:
@@ -10,14 +10,24 @@
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
- name: "[PREFLIGHT] Ensure 'snippets' is enabled for {{ proxmox_snippets_storage }}"
|
||||
|
||||
# - name: "[PREFLIGHT] Ensure 'snippets' is enabled for {{ proxmox_snippets_storage }}"
|
||||
# ansible.builtin.replace:
|
||||
# path: /etc/pve/storage.cfg
|
||||
# regexp: '(dir:\s*{{ proxmox_snippets_storage }}[\s\S]*?content\s+)(.*)(?<!snippets)'
|
||||
# replace: '\1\2,snippets'
|
||||
# vars:
|
||||
# proxmox_snippets_storage: local
|
||||
|
||||
- name: "Ensure 'snippets' is enabled for {{ proxmox_snippets_storage }}"
|
||||
ansible.builtin.replace:
|
||||
path: /etc/pve/storage.cfg
|
||||
regexp: '(?ms)(dir:\s*{{ proxmox_snippets_storage }}.*?content\s*=.*?)(?<!snippets)$'
|
||||
regexp: '(?ms)(dir:\s*{{ proxmox_snippets_storage }}\b.*?content\s*=\s*(?!.*snippets)([^ \n]+))'
|
||||
replace: '\1,snippets'
|
||||
vars:
|
||||
proxmox_snippets_storage: local
|
||||
|
||||
|
||||
- name: "[PREFLIGHT] Ensure snippets storage directory exists"
|
||||
ansible.builtin.file:
|
||||
path: "{{ proxmox_snippets_storage_path }}/snippets"
|
||||
@@ -107,8 +117,8 @@
|
||||
storage: local-lvm
|
||||
disk_size: 64G
|
||||
vlan: 50
|
||||
ip_address: 192.168.0.99/24
|
||||
ip_address: 192.168.2.99/24
|
||||
gateway: 192.168.2.1
|
||||
nameservers:
|
||||
- 192.168.2.25
|
||||
- 192.168.2.100
|
||||
- 192.168.0.26
|
||||
Reference in New Issue
Block a user