Could you move the 2 user parts to https://github.com/afx114/puppet-elasticsearch/blob/plugin_permissions/manifests/plugin.pp#L53 ?

so its in the master Exec part?