Skip to content

Commit

Permalink
Merge pull request #193 from yussufsh/yussufsh-patch-1
Browse files Browse the repository at this point in the history
Support non-root user for dhcp update
  • Loading branch information
Power Cloud Robot authored Feb 13, 2024
2 parents efb74c5 + 0160285 commit cccf79f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions playbooks/roles/ocp-config/tasks/dhcpd_update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
block:
- name: Remove pool, range and deny statements
shell: |
sed -i.bak '/pool {/d' /etc/dhcp/dhcpd.conf
sed -i '/range /d' /etc/dhcp/dhcpd.conf
sed -i '$d' /etc/dhcp/dhcpd.conf
sed -i 's/deny unknown-clients/#deny unknown-clients/' /etc/dhcp/dhcpd.conf
sed -i 's/authoritative;/#authoritative;/' /etc/dhcp/dhcpd.conf
sudo sed -i.bak '/pool {/d' /etc/dhcp/dhcpd.conf
sudo sed -i '/range /d' /etc/dhcp/dhcpd.conf
sudo sed -i '$d' /etc/dhcp/dhcpd.conf
sudo sed -i 's/deny unknown-clients/#deny unknown-clients/' /etc/dhcp/dhcpd.conf
sudo sed -i 's/authoritative;/#authoritative;/' /etc/dhcp/dhcpd.conf
- name: restart dhcpd
become: true
service:
name: dhcpd
state: restarted
Expand Down

0 comments on commit cccf79f

Please sign in to comment.