Skip to content

Commit

Permalink
default/hostapd: replace config rather than appending it
Browse files Browse the repository at this point in the history
  • Loading branch information
alxwr committed Jul 21, 2017
1 parent 27efa18 commit c29f376
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hostapd/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ hostapd_pkgs:
{%- if map.defaults_file is defined %}
hostapd_activate:
file.append:
file.replace:
- name: {{ map.defaults_file }}
- text: "DAEMON_CONF='{% for card in salt['pillar.get']('hostapd:cardlist', {}).keys() %}{{ card2conf(card, map) }} {% endfor %}'"
- pattern: "^DAEMON_CONF=.*$"
- repl: "DAEMON_CONF='{% for card in salt['pillar.get']('hostapd:cardlist', {}).keys() %}{{ card2conf(card, map) }} {% endfor %}'"
{%- endif %}
# Ensure hostapd service is running and autostart is enabled
Expand Down

0 comments on commit c29f376

Please sign in to comment.