-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.yml
35 lines (30 loc) · 1.12 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
- hosts: mnesia
roles:
- gekmihesg.openwrt
vars:
gluon_image_url: https://hannover.freifunk.net/download/Router-Firmware/Erstinstallation/gluon-ffh-vH21-x86-64.img.gz
wan_bridge: vmbr0
proxmox_user: "ansible-test@pve"
proxmox_password: "{{ proxmox_api_password }}"
proxmox_node: "mnesia"
proxmox_storage_group: local-hdd
tasks:
- name: Ensure specified proxmox_storage_group {{proxmox_storage_group}} is a zfs pool
command: "grep '^zfspool: {{proxmox_storage_group}}$' /etc/pve/storage.cfg"
changed_when: False
- name: Get the pool of proxmox_storage_group
command: "awk '/^zfspool: local-hdd$/ { start=1; } /^\tpool/ { if (start) { print $2; exit 0 } }' /etc/pve/storage.cfg"
register: zfs_pool_stdout
changed_when: False
- name: Store zfs pool in variable zfs_pool
set_fact:
zfs_pool: "{{zfs_pool_stdout.stdout_lines[0]}}"
- name: Test1
include_tasks: new_gluon_node.yml
vars:
gluon_hostname: fftestnode1
# - name: Test2
# include_tasks: new_gluon_node.yml
# vars:
# gluon_hostname: fftestnode2