Skip to content

Commit

Permalink
F fix rc local (#291)
Browse files Browse the repository at this point in the history
* Update main.yml

* Update main.yml
  • Loading branch information
ToivoS authored Oct 22, 2020
1 parent f5825b8 commit eb4d802
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ansible/roles/installation/dhcp/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,21 @@
path: /etc/rc.local
backup: yes
block: |
#!bin/bash
iptables-restore < /etc/iptables.sav
ifdown {{ dhcp_interface_name }}
ifup {{ dhcp_interface_name }}
insertbefore: "exit 0"
create: yes
changed_when: false

- name: Include bin/bash in rc.local first line
become: yes
lineinfile:
path: /etc/rc.local
insertbefore: BOF
line: "#!bin/bash"
state: present

- name: Making rc.local executable
file:
path: /etc/rc.local
Expand Down

0 comments on commit eb4d802

Please sign in to comment.