Saltstack Official Apt Formula
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

72 lines
3.7KB

  1. ########################################################################
  2. # File managed by Salt at <{{ source }}>.
  3. # Your changes will be overwritten.
  4. ########################################################################
  5. {% set apt = pillar.get('apt', {}) -%}
  6. {% set unattended = apt.get('unattended', {}) -%}
  7. {% set allowed_origins = unattended.get('allowed_origins', ['${distro_id}:${distro_codename}-security']) -%}
  8. {% set origins_patterns = unattended.get('origins_patterns', ['origin=Debian,archive=stable,label=Debian-Security']) -%}
  9. {% set package_blacklist = unattended.get('package_blacklist', {}) -%}
  10. {% set auto_fix_interrupted_dpkg = unattended.get('auto_fix_interrupted_dpkg', 'true') -%}
  11. {% set minimal_steps = unattended.get('minimal_steps', 'false') -%}
  12. {% set install_on_shutdown = unattended.get('install_on_shutdown', 'false') -%}
  13. {% set mail = unattended.get('mail', '') -%}
  14. {% set sender = unattended.get('sender', 'root') -%}
  15. {% set mail_only_on_error = unattended.get('mail_only_on_error', 'false') -%}
  16. {% set mail_report = unattended.get('mail_report', 'on-change') -%}
  17. {% if mail_only_on_error -%}
  18. {% set mail_report = 'only-on-error' -%}
  19. {% endif -%}
  20. {% if mail_report not in ['always', 'only-on-error', 'on-change'] -%}
  21. {{ raise('apt-formula: mail_report should be one of "always", "only-on-error" or "on-change".') }}
  22. {% endif -%}
  23. {% set remove_unused_dependencies = unattended.get('remove_unused_dependencies', 'false') -%}
  24. {% set remove_new_unused_dependencies = unattended.get('remove_new_unused_dependencies', 'true') -%}
  25. {% set automatic_reboot = unattended.get('automatic_reboot', 'false') -%}
  26. {% set automatic_reboot_time = unattended.get('automatic_reboot_time', 'now') -%}
  27. {% set dl_limit = unattended.get('dl_limit', '0') -%}
  28. {% set syslog_enable = unattended.get('syslog_enable', 'false') -%}
  29. {% set syslog_facility = unattended.get('syslog_facility', 'daemon') -%}
  30. {% set package_whitelist_strict = unattended.get('package_whitelist_strict', 'false') -%}
  31. {% set keep_debs_after_install = unattended.get('keep_debs_after_install', 'false') -%}
  32. {% set dpkg_options = unattended.get('dpkg_options', '') -%}
  33. {% set update_days = unattended.get('update_days', '') -%}
  34. Unattended-Upgrade::Allowed-Origins {
  35. {%- for pattern in allowed_origins %}
  36. "{{ pattern }}";
  37. {%- endfor %}
  38. };
  39. Unattended-Upgrade::Origins-Pattern {
  40. {%- for pattern in origins_patterns %}
  41. "{{ pattern }}";
  42. {%- endfor %}
  43. };
  44. Unattended-Upgrade::Package-Blacklist {
  45. {%- for package in package_blacklist %}
  46. "{{ package }}";
  47. {%- endfor %}
  48. };
  49. Unattended-Upgrade::AutoFixInterruptedDpkg "{{ auto_fix_interrupted_dpkg }}";
  50. Unattended-Upgrade::MinimalSteps "{{ minimal_steps }}";
  51. Unattended-Upgrade::InstallOnShutdown "{{ install_on_shutdown }}";
  52. Unattended-Upgrade::Mail "{{ mail }}";
  53. Unattended-Upgrade::Sender "{{ sender }}";
  54. Unattended-Upgrade::MailReport "{{ mail_report }}";
  55. Unattended-Upgrade::Remove-Unused-Dependencies "{{ remove_unused_dependencies }}";
  56. Unattended-Upgrade::Remove-New-Unused-Dependencies "{{ remove_new_unused_dependencies }}";
  57. Unattended-Upgrade::Automatic-Reboot "{{ automatic_reboot }}";
  58. Unattended-Upgrade::Automatic-Reboot-Time "{{ automatic_reboot_time }}";
  59. Unattended-Upgrade::SyslogEnable "{{ syslog_enable }}";
  60. Unattended-Upgrade::SyslogFacility "{{ syslog_facility }}";
  61. Unattended-Upgrade::Keep-Debs-After-Install "{{ keep_debs_after_install }}";
  62. Unattended-Upgrade::Package-Whitelist-Strict "{{ package_whitelist_strict }}";
  63. {% if update_days and update_days | is_list -%}
  64. Unattended-Upgrade::Update-Days {"{{ update_days | join('";"') }}"};
  65. {% endif -%}
  66. Acquire::http::Dl-Limit "{{ dl_limit }}";
  67. {% if dpkg_options -%}
  68. Dpkg::Options {"{{ dpkg_options }}"};
  69. {% endif -%}