You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
Hi
I'm using roles extensively to separate functionality, and I'm trying
to keep the roles as general as possible. The resulting playbooks are
very minimal, containing not more than a set of include_role tasks.
Many roles use templates, which are stored inside the role's templates
directory.
Those templates can sometimes be quite specific, and are not usable in
every scenario.
So I'm looking for a way to 'override' the templates.
Putting my custom template next to my playbook doesn't work, but it
comes close. That path is included in the searchpath - but has lower
priority:
--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT
S C Rigler
unread,
Jan 31, 2019, 8:19:18 AM1/31/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
Maybe something like setting "NAGIOS_TEMPLATE: nagios_local.j2" in
your role's defaults then override NAGIOS_TEMPLATE (inventory variable
or whatever) as needed with a path to an alternate template.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
On 31.01.2019 13:44, Dick Visser wrote:
> BTW - Ideally I would like to be able to use the same inheritance
> structure
> that is already in place for variables, in particular these concepts:
>
> - group_templates/all
> - group_templates/mygroup
> - host_templates/myhost
Instead of template module use the copy module with content instead of
src.
The template you have in a variable and use content like so.