Skip to content

Commit d82fe9d

Browse files
committed
Remove unneded fact setting; only specify source for zfs type pools
1 parent c5dbae4 commit d82fe9d

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

tasks/pools.yml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,4 @@
4141
autostart: yes
4242
uri: "{{ libvirt_host_uri | default(omit, true) }}"
4343
with_items: "{{ libvirt_host_pools }}"
44-
become: True
45-
46-
- name: "Create custom fact directory"
47-
file:
48-
path: "/etc/ansible/facts.d"
49-
state: "directory"
50-
when: item.type == "zfs"
51-
with_items: "{{ libvirt_host_pools }}"
52-
become: True
53-
54-
- name: Create Ansible fact for zfs pool to path mapping
55-
ini_file:
56-
path: /etc/ansible/facts.d/libvirt.fact
57-
section: zfs_storage_pools
58-
option: "{{ item.name }}"
59-
value: "{{ item.source }}"
60-
when: item.type == "zfs"
61-
with_items: "{{ libvirt_host_pools }}"
62-
become: True
63-
64-
- name: reload facts
65-
setup: ~
44+
become: True

templates/pool.xml.j2

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,4 @@
1111
{% endif %}
1212
</source>
1313
{% endif %}
14-
{% if item.type != 'zfs' %}
15-
<target>
16-
<path>{{ item.path | default('placeholder_value') }}</path>
17-
</target>
18-
{% endif %}
1914
</pool>

0 commit comments

Comments
 (0)