Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ansible
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nounous
Ansible
Commits
43ef614e
Verified
Commit
43ef614e
authored
5 years ago
by
me5na7qbjqbrp
Browse files
Options
Downloads
Patches
Plain Diff
Init DHCP
parent
36d0dbe0
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
network.yml
+8
-0
8 additions, 0 deletions
network.yml
roles/isc-dhcp-server/tasks/main.yml
+21
-0
21 additions, 0 deletions
roles/isc-dhcp-server/tasks/main.yml
roles/isc-dhcp-server/templates/dhcp/dhcpd.conf.j2
+32
-0
32 additions, 0 deletions
roles/isc-dhcp-server/templates/dhcp/dhcpd.conf.j2
with
61 additions
and
0 deletions
network.yml
+
8
−
0
View file @
43ef614e
...
...
@@ -13,6 +13,14 @@
-
wireguard
-
motd-role
# Deploy DHCP server
-
hosts
:
dhcp.adm.crans.org
vars
:
dhcp
:
authoritative
:
true
roles
:
-
isc-dhcp-server
# Deploy recursive DNS cache server
-
hosts
:
odlyd.adm.crans.org
roles
:
...
...
This diff is collapsed.
Click to expand it.
roles/isc-dhcp-server/tasks/main.yml
0 → 100644
+
21
−
0
View file @
43ef614e
---
-
name
:
Install isc-dhcp-server
apt
:
update_cache
:
true
name
:
isc-dhcp-server
state
:
present
register
:
apt_result
retries
:
3
until
:
apt_result is succeeded
-
name
:
Configure isc-dhcp-server
template
:
src
:
dhcp/dhcpd.conf.j2
dest
:
/etc/dhcp/dhcpd.conf
mode
:
0600
-
name
:
Ensure that isc-dhcp-server is started
systemd
:
name
:
isc-dhcp-server
state
:
started
enabled
:
true
This diff is collapsed.
Click to expand it.
roles/isc-dhcp-server/templates/dhcp/dhcpd.conf.j2
0 → 100644
+
32
−
0
View file @
43ef614e
# dhcpd.conf
# {{ ansible_managed }}
# option definitions common to all supported networks...
#option domain-name "example.org";
#option domain-name-servers ns1.example.org, ns2.example.org;
# We have tagged network so use last 4 bytes for tag (1500 max)
option interface-mtu 1496;
default-lease-time 600;
max-lease-time 7200;
# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
{% if dhcp.authoritative %}
authoritative;
{% else %}
#authoritative;
{% endif %}
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
#log-facility local7;
# TODO
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment