Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
network
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
infra
ansible-shared
network
Commits
f833a31c
Commit
f833a31c
authored
7 years ago
by
Robin Sonnabend
Committed by
Lars Beckers
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Enhance readability of dhcp-config
parent
2f126a31
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
roles/dhcp-server/tasks/main.yml
+1
-1
1 addition, 1 deletion
roles/dhcp-server/tasks/main.yml
roles/dhcp-server/templates/dnsmasq.conf
+5
-3
5 additions, 3 deletions
roles/dhcp-server/templates/dnsmasq.conf
with
6 additions
and
4 deletions
roles/dhcp-server/tasks/main.yml
+
1
−
1
View file @
f833a31c
...
...
@@ -31,7 +31,7 @@
-
dhcp-server
-
name
:
ensure we have a tftp root dir
file
:
name="{{tftp_root}}" state=directory owner="{{dnsmasq_user}}" group="{{dnsmasq_group}}" mode=0
644
file
:
name="{{tftp_root}}" state=directory owner="{{dnsmasq_user}}" group="{{dnsmasq_group}}" mode=0
755
when
:
tftp_active
tags
:
-
config
...
...
This diff is collapsed.
Click to expand it.
roles/dhcp-server/templates/dnsmasq.conf
+
5
−
3
View file @
f833a31c
# This file was AUTOMATICALLY generated by ansible
# changing it manually won't last long
# PLEASE change vars/dhcp in the ansible repository instead.
# No DNS function, just dhcp & pxe
port
=
0
...
...
@@ -12,13 +16,11 @@ dhcp-range={% if dhcp_range.tag is defined %}set:{{dhcp_range.tag}},{% endif %}{
{%
endfor
%}
{%
for
dhcp_host
in
dhcp_fixed_hosts
%}
dhcp
-
host
={{
dhcp_host
.
mac
}},{{
lookup
(
'dig'
,
dhcp_host
.
name
)}}
dhcp
-
host
={{
dhcp_host
.
mac
|
upper
}},{{
lookup
(
'dig'
,
dhcp_host
.
name
)}}
# {{dhcp_host.name}}
{%
endfor
%}
{%
for
dhcp_option
in
dhcp_options
%}
dhcp
-
option
{%
if
dhcp_option
.
force
is
defined
and
dhcp_option
.
force
%}-
force
{%
endif
%}={%
if
dhcp_option
.
tag
is
defined
%}
tag
:{{
dhcp_option
.
tag
}},{%
endif
%}
option
:{{
dhcp_option
.
option
}},{{
dhcp_option
.
value
}}
{%
endfor
%}
# Send options to PXELinux. Note that we need to send the options even
...
...
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