Skip to content

Commit

Permalink
oops!
Browse files Browse the repository at this point in the history
  • Loading branch information
christianh814 committed Jul 12, 2019
1 parent 6cf37ec commit 8e0f042
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
11 changes: 11 additions & 0 deletions files/helper-tftp.service
@@ -0,0 +1,11 @@
[Unit]
Description=Starts TFTP on boot because of reasons
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/start-tftp.sh
TimeoutStartSec=0

[Install]
WantedBy=default.target
4 changes: 4 additions & 0 deletions files/start-tftp.sh
@@ -0,0 +1,4 @@
#!/bin/bash
/usr/bin/systemctl start tftp > /dev/null 2>&1
##
##
20 changes: 20 additions & 0 deletions tasks/main.yml
Expand Up @@ -153,6 +153,25 @@
mode: 0555
when: not staticips

- name: Installing TFTP Systemd helper
copy:
src: ../files/start-tftp.sh
dest: /usr/local/bin/start-tftp.sh
mode: '0555'
when: not staticips

- name: Installing TFTP Systemd unit file
copy:
src: ../files/helper-tftp.service
dest: /etc/systemd/system/helper-tftp.service
mode: '0655'
when: not staticips

- name: Systemd daemon reload
systemd:
daemon_reload: yes
when: not staticips

- name: Starting services
service:
name: "{{ item }}"
Expand All @@ -171,6 +190,7 @@
with_items:
- dhcpd
- tftp
- helper-tftp
when: not staticips

- name: Unmasking Services
Expand Down

0 comments on commit 8e0f042

Please sign in to comment.