File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 102
102
103
103
exec { 'get-or-set virsh secret' :
104
104
command => ' /usr/bin/virsh secret-define --file /etc/nova/secret.xml | /usr/bin/awk \' {print $2}\' | sed \' /^$/d\' > /etc/nova/virsh.secret' ,
105
- creates => ' /etc/nova /virsh. secret' ,
105
+ unless => " /usr/bin /virsh secret-list | grep ${libvirt_rbd_secret_uuid} " ,
106
106
require => [File [' /etc/nova/secret.xml' ], Service[' libvirt' ]],
107
107
}
108
108
113
113
}
114
114
exec { 'set-secret-value virsh' :
115
115
command => " /usr/bin/virsh secret-set-value --secret ${libvirt_rbd_secret_uuid} --base64 ${libvirt_key} " ,
116
- unless => " /usr/bin/virsh secret-get-value ${libvirt_rbd_secret_uuid} " ,
116
+ unless => " /usr/bin/virsh secret-get-value ${libvirt_rbd_secret_uuid} | grep ${libvirt_key} " ,
117
117
require => Exec[' get-or-set virsh secret' ],
118
118
before => Anchor[' nova::config::end' ],
119
119
}
Original file line number Diff line number Diff line change 89
89
] )
90
90
is_expected . to contain_exec ( 'get-or-set virsh secret' ) . with (
91
91
:command => '/usr/bin/virsh secret-define --file /etc/nova/secret.xml | /usr/bin/awk \'{print $2}\' | sed \'/^$/d\' > /etc/nova/virsh.secret' ,
92
- :creates => '/etc/nova /virsh. secret' ,
92
+ :unless => '/usr/bin /virsh secret-list | grep UUID ' ,
93
93
:require => [ 'File[/etc/nova/secret.xml]' , 'Service[libvirt]' ] ,
94
94
)
95
95
is_expected . to contain_exec ( 'set-secret-value virsh' ) . with (
140
140
] )
141
141
is_expected . to contain_exec ( 'get-or-set virsh secret' ) . with (
142
142
:command => '/usr/bin/virsh secret-define --file /etc/nova/secret.xml | /usr/bin/awk \'{print $2}\' | sed \'/^$/d\' > /etc/nova/virsh.secret' ,
143
- :creates => '/etc/nova /virsh. secret' ,
143
+ :unless => '/usr/bin /virsh secret-list | grep UUID ' ,
144
144
:require => [ 'File[/etc/nova/secret.xml]' , 'Service[libvirt]' ] ,
145
145
)
146
146
is_expected . to contain_exec ( 'set-secret-value virsh' ) . with (
You can’t perform that action at this time.
0 commit comments