Added more support for $vmware_admin_group variable.
This commit is contained in:
parent
a2e7cc65b5
commit
0a845626b0
1 changed files with 8 additions and 1 deletions
|
@ -48,13 +48,20 @@ class vmware::server {
|
|||
Class["puppet::client"], ],
|
||||
notify => Exec["restart-vmware-mgmt"],
|
||||
}
|
||||
|
||||
exec { "restart-vmware-mgmt":
|
||||
command => "/etc/init.d/vmware-mgmt restart && sleep 10",
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
user => root,
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
exec { "vmware-admin-add-${vmware_admin_group}":
|
||||
command => "/usr/bin/vmware-vim-cmd vimsvc/auth/entity_permission_add 'vim.Folder:ha-folder-root' '${vmware_admin_group}' 'true' 'Admin' 'true'",
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
user => root,
|
||||
unless => "/usr/bin/vmware-vim-cmd vimsvc/auth/entity_permissions 'vim.Folder:ha-folder-root' | egrep 'principal|roleId' | cut -d= -f2 | sed -e 'N;s/\\n/ /' | fgrep -- -1 | grep '\"${vmware_admin_group}\"'",
|
||||
require => Service["vmware"],
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue