blob: fd27d28eba6839c0834fe2b301f02c953ee962e9 [file] [log] [blame]
{% from "jenkins/map.jinja" import client with context %}
{% for name, lib in client.get("lib",{}).iteritems() %}
{%- if lib.enabled|default(True) %}
global_library_{{ name }}:
jenkins_lib.present:
- name: {{ lib.get('name', name) }}
- url: {{ lib.url }}
{%- if lib.credential_id is defined %}
- credential_id: {{ lib.credential_id }}
{%- endif %}
- branch: {{ lib.get("branch", "master") }}
{%- else %}
global_library_{{ name }}_absent:
jenkins_lib.absent:
- name: {{ lib.get('name', name) }}
{%- endif %}
{% endfor %}