Saltstack Official Linux Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 line
439B

  1. {%- from "linux/map.jinja" import network with context %}
  2. {%- if network.dhclient.enabled|default(False) %}
  3. dhclient_conf:
  4. file.managed:
  5. - name: {{ network.dhclient_config }}
  6. - source: salt://linux/files/dhclient.conf
  7. - template: jinja
  8. {%- elif network.dhclient.enabled is defined and network.dhclient.enabled == False %}
  9. kill_dhcp_client:
  10. cmd.run:
  11. - name: "pkill dhclient"
  12. - onlyif: "pgrep dhclient"
  13. {%- endif %}