On 07.06.16 20:48 Rens Verhage wrote:

> It would be great if remote_user could be used per role, something like:
> 
>   - ldap { remote_user: root }
> 
> Sadly, this is not supported. How should I do a thing like this? I tried 
> adding 'remote_user: root' to all tasks in the ldap role, but I couldn't 
> get that to work either.

Why is this not supported? Just try the right syntax:

roles:
  - { role: ldap, remote_user: root, someVariable: foo}

See https://docs.ansible.com/ansible/playbooks_variables.html#id33
(parametrized roles)

Johannes



-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/575725C0.7000706%40ojkastl.de.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to