blob: ae85199962bbd7a386614d852a445d5929d3ece3 [file] [log] [blame]
{%- from "designate/map.jinja" import server, client, pool_manager, agent, worker with context %}
designate_task_pkgs_latest:
test.show_notification:
- name: "dump_message_pkgs_latest"
- text: "Running designate.upgrade.pkgs_latest"
policy-rc.d_present:
file.managed:
- name: /usr/sbin/policy-rc.d
- mode: 755
- contents: |
#!/bin/sh
exit 101
{%- set pkgs = [] %}
{%- if server.get('enabled', false) %}
{%- do pkgs.extend(server.pkgs) %}
{%- endif %}
{%- if client.get('enabled', false) %}
{%- do pkgs.extend(client.pkgs) %}
{%- endif %}
{%- if pool_manager.get('enabled', false) %}
{%- do pkgs.extend(pool_manager.pkgs) %}
{%- endif %}
{%- if worker.get('enabled', false) %}
{%- do pkgs.extend(worker.pkgs) %}
{%- endif %}
{%- if agent.get('enabled', false) %}
{%- do pkgs.extend(agent.pkgs) %}
{%- endif %}
designate_packages:
pkg.latest:
- names: {{ pkgs|unique }}
- require:
- file: policy-rc.d_present
- require_in:
- file: policy-rc.d_absent
policy-rc.d_absent:
file.absent:
- name: /usr/sbin/policy-rc.d