Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Ansible FreeIPA
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Ansible FreeIPA
Commits
178cf218
Unverified
Commit
178cf218
authored
11 months ago
by
f-trivino
Committed by
GitHub
11 months ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #1284 from t-woerner/infra_image_system_services_dns_and_kinit
Infra image system services dns and kinit
parents
88dc4c69
36f26bdf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
infra/image/system-service/fixipaip.sh
+9
-2
9 additions, 2 deletions
infra/image/system-service/fixipaip.sh
infra/image/system-service/fixnet.sh
+5
-1
5 additions, 1 deletion
infra/image/system-service/fixnet.sh
with
14 additions
and
3 deletions
infra/image/system-service/fixipaip.sh
+
9
−
2
View file @
178cf218
...
@@ -44,13 +44,18 @@ if [ -z "${PTR}" ] || [ -n "${PTR//[0-9]}" ]; then
...
@@ -44,13 +44,18 @@ if [ -z "${PTR}" ] || [ -n "${PTR//[0-9]}" ]; then
echo
"ERROR: Failed to get PTR from IPv4 address: '
${
PTR
}
'"
echo
"ERROR: Failed to get PTR from IPv4 address: '
${
PTR
}
'"
exit
1
exit
1
fi
fi
FORWARDER
=
$(
grep
-s
-m
1 ^nameserver /etc/resolv.conf.fixnet |
cut
-d
" "
-f
2
)
if
[
-z
"
${
FORWARDER
}
"
]
||
[
"
${
FORWARDER
}
"
==
"127.0.0.1"
]
;
then
FORWARDER
=
"8.8.8.8"
fi
echo
"Fix IPA
IP
:"
echo
"Fix IPA:"
echo
" HOSTNAME: '
${
HOSTNAME
}
'"
echo
" HOSTNAME: '
${
HOSTNAME
}
'"
echo
" IP: '
${
IP
}
'"
echo
" IP: '
${
IP
}
'"
echo
" PTR: '
${
PTR
}
'"
echo
" PTR: '
${
PTR
}
'"
echo
" FORWARDER: '
${
FORWARDER
}
'"
if
!
echo
"SomeADMINpassword"
| kinit
-c
"
${
KRB5CCNAME
}
"
if
!
echo
"SomeADMINpassword"
| kinit
-c
"
${
KRB5CCNAME
}
"
admin
>
/dev/null
then
then
echo
"ERROR: Failed to obtain Kerberos ticket"
echo
"ERROR: Failed to obtain Kerberos ticket"
exit
1
exit
1
...
@@ -77,6 +82,8 @@ for zone in ${ZONES}; do
...
@@ -77,6 +82,8 @@ for zone in ${ZONES}; do
fi
fi
done
done
ipa dnsserver-mod
"
${
HOSTNAME
}
"
--forwarder
=
"
${
FORWARDER
}
"
kdestroy
-c
"
${
KRB5CCNAME
}
"
-A
kdestroy
-c
"
${
KRB5CCNAME
}
"
-A
exit
0
exit
0
This diff is collapsed.
Click to expand it.
infra/image/system-service/fixnet.sh
+
5
−
1
View file @
178cf218
...
@@ -51,7 +51,11 @@ else
...
@@ -51,7 +51,11 @@ else
echo
-e
"
$IP
\t
${
HOSTNAME
}
${
HOSTNAME
%%.*
}
"
>>
/etc/hosts
echo
-e
"
$IP
\t
${
HOSTNAME
}
${
HOSTNAME
%%.*
}
"
>>
/etc/hosts
fi
fi
echo
"nameserver 127.0.0.1"
>
/etc/resolv.conf
cp
-a
/etc/resolv.conf /etc/resolv.conf.fixnet
cat
>
/etc/resolv.conf
<<
EOF
search
${
HOSTNAME
#*.
}
nameserver 127.0.0.1
EOF
echo
"/etc/hosts:"
echo
"/etc/hosts:"
cat
"/etc/hosts"
cat
"/etc/hosts"
...
...
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