Skip to content

Commit 7f53f6f

Browse files
committed
fix auth variable names
1 parent 77d9aae commit 7f53f6f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Role Variables
103103
`libvirt_volume_default_device` are valid here. Default is
104104
`libvirt_volume_default_type`.
105105
- `capacity`: volume capacity, can be suffixed with k, M, G, T, P or E when type is `network` or MB,GB,TB, etc when type is `disk` (required when type is `disk` or `network`)
106-
- `auth`: Authentication details should they be required. If auth is required, `name`, `type`, and `token` or `usage` will need to be supplied. `token` and `usage` should not be both supplied.
106+
- `auth`: Authentication details should they be required. If auth is required, `username`, `type`, and `uuid` or `usage` will need to be supplied. `uuid` and `usage` should not be both supplied.
107107
- `source`: Where the remote volume comes from when type is `network`. `protocol`, `name`, and `hostname` or `hosts_list` should be supplied. `hostname` and `hosts_list` should not be both supplied. `port` is optional.
108108
- `format`: Format of the volume. All options for
109109
`libvirt_volume_default_format` are valid here. Default is
@@ -199,9 +199,9 @@ Example Playbook
199199
format: 'raw'
200200
capacity: '50G'
201201
auth:
202-
name: 'admin'
202+
username: 'admin'
203203
type: 'ceph'
204-
token: ''
204+
uuid: ''
205205
source:
206206
protocol: 'rbd'
207207
name: 'rbd/bigstore'
@@ -212,7 +212,7 @@ Example Playbook
212212
format: 'raw'
213213
capacity: '50G'
214214
auth:
215-
name: 'admin'
215+
username: 'admin'
216216
type: 'ceph'
217217
usage: 'rbd-pool'
218218
source:

templates/vm.xml.j2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
{% if volume.type | default(libvirt_volume_default_type) == 'file' %}
4242
<source file='{{ volume.file_path |default(libvirt_volume_default_images_path) }}/{{ volume.name}}'/>
4343
{% elif volume.type is defined and volume.type == 'network' %}
44-
{% if volume.auth.name is defined %}
45-
<auth username='{{ volume.auth.name }}'>
46-
<secret type='{{ volume.auth.type }}' {% if volume.auth.token is defined and volume.auth.token is not none %} uuid='{{ volume.auth.token }}' {% else %} usage='{{ volume.auth.usage }}' {% endif %}/>
44+
{% if volume.auth.username is defined %}
45+
<auth username='{{ volume.auth.username }}'>
46+
<secret type='{{ volume.auth.type }}' {% if volume.auth.uuid is defined and volume.auth.uuid is not none %} uuid='{{ volume.auth.uuid }}' {% else %} usage='{{ volume.auth.usage }}' {% endif %}/>
4747
</auth>
48-
{% endif %} {# End volume.auth.name check #}
48+
{% endif %} {# End volume.auth.username check #}
4949
{% if volume.source.name is defined %}
5050
<source protocol='{{ volume.source.protocol }}' name='{{ volume.source.name }}'>
5151
{% if volume.source.hosts_list is defined and volume.source.hosts_list is not none %}

0 commit comments

Comments
 (0)