Pārlūkot izejas kodu

Add chrony.removed state to uninstall package

When calling chrony.removed salt ensures the service is stopped
and the package has been removed.
tags/v0.2.0
Andreas Thienemann pirms 7 gadiem
vecāks
revīzija
fb582f1545
2 mainītis faili ar 14 papildinājumiem un 0 dzēšanām
  1. +4
    -0
      README.rst
  2. +10
    -0
      chrony/removed.sls

+ 4
- 0
README.rst Parādīt failu

@@ -18,3 +18,7 @@ Installs the chrony package.
``chrony.config``
-----------------
This state manages the file ``chrony.conf`` under ``/etc`` (template found in "chrony/files"). The configuration is populated by values in "chrony/map.jinja", which are based on the package's default values (for RedHat, Debian and Arch family distributions), and are overridden by values of the same name in pillar.

``chrony.removed``
-----------------
Stops the service and uninstalls the package.

+ 10
- 0
chrony/removed.sls Parādīt failu

@@ -0,0 +1,10 @@
{% from "chrony/map.jinja" import chrony with context %}

chrony_removed:
service.dead:
- enable: False
- name: {{ chrony.service }}
pkg.removed:
- name: {{ chrony.package }}
- require:
- service: chrony_removed

Notiek ielāde…
Atcelt
Saglabāt