ansible-network / config_manager

Ansible Network Config Manager Role
GNU General Public License v3.0
23 stars 17 forks source link

add templates list as option #19

Open jwoogee opened 5 years ago

jwoogee commented 5 years ago

Adding config_manager_templates as an option for this role so we can pass a list of names of templates to apply, there is a template, config_sections.j2 that combines the templates so we can easily apply whichever templates we want with this role. I'm updating cisco_ios to accommodate this also.

privateip commented 5 years ago

Responding here as well based on discussion in ansiblenetwork slack channel. The config_manager role already supports passing in a J2 template with the resulting output being passed to the provider role so I believe this PR is a little redundant.

jwoogee commented 5 years ago

The difference is that config_manager_templates expects a list of templates to load into config_sections.j2 when it gets to ansible-network.cisco_ios(other vendor specific roles would get the same benefit with the addition). This makes it functional to get all facts in one role, then load all necessary templates in one run of the config_manager role.