Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
samba
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
samba
Commits
4a283d3e
Commit
4a283d3e
authored
5 years ago
by
Lars Beckers
Browse files
Options
Downloads
Patches
Plain Diff
ad-auth: update usage of shell module and passwordstore
parent
89ee8ec8
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
ad-auth/defaults/main.yml
+1
-0
1 addition, 0 deletions
ad-auth/defaults/main.yml
ad-auth/handlers/main.yml
+6
-3
6 additions, 3 deletions
ad-auth/handlers/main.yml
ad-auth/tasks/sssd.yml
+10
-5
10 additions, 5 deletions
ad-auth/tasks/sssd.yml
with
17 additions
and
8 deletions
ad-auth/defaults/main.yml
+
1
−
0
View file @
4a283d3e
...
...
@@ -2,3 +2,4 @@
ad_admin_group
:
admin
ad_admin_password
:
samba-admin
ad_admin_password_content
:
"
{{
lookup('passwordstore',
ad_admin_password)
}}"
This diff is collapsed.
Click to expand it.
ad-auth/handlers/main.yml
+
6
−
3
View file @
4a283d3e
---
# file: roles/ad-auth/handlers/main.yml
-
name
:
regenerate pam config
shell
:
DEBIAN_FRONTEND=noninteractive pam-auth-update --force
command
:
pam-auth-update --force
environment
:
DEBIAN_FRONTEND
:
noninteractive
-
name
:
clear sssd cache
command
:
sss_cache -E
...
...
@@ -11,7 +12,9 @@
failed_when
:
"
result.rc
!=
0
and
result.rc
!=
2"
-
name
:
restart sssd
service
:
name=sssd state=restarted
service
:
name
:
sssd
state
:
restarted
-
name
:
check sudo config
command
:
visudo -q -c -f /etc/sudoers
This diff is collapsed.
Click to expand it.
ad-auth/tasks/sssd.yml
+
10
−
5
View file @
4a283d3e
...
...
@@ -23,7 +23,11 @@
-
sssd
-
name
:
check if our realm is configured
shell
:
realm list | grep "{{ domain }}"
shell
:
|
set -o pipefail
realm list | grep "{{ domain }}"
args
:
executable
:
/bin/bash
register
:
current_realms
changed_when
:
"
current_realms.rc
!=
0"
failed_when
:
"
current_realms.rc
!=
0
and
current_realms.rc
!=
1"
...
...
@@ -38,7 +42,7 @@
-
name
:
get a kerberos ticket
# yamllint disable-line rule:line-length
shell
:
echo "{{
lookup('passwordstore',
ad_admin_password
)
}}" | kinit Administrator
shell
:
echo "{{ ad_admin_password
_content
}}" | kinit Administrator
when
:
debian_version == "jessie"
no_log
:
true
tags
:
...
...
@@ -57,7 +61,7 @@
command
:
kinit Administrator
responses
:
# yamllint disable-line rule:line-length
"
Passwor(d|t)
for
Administrator.*"
:
"
{{
lookup('passwordstore',
ad_admin_password
)
}}"
"
Passwor(d|t)
for
Administrator.*"
:
"
{{
ad_admin_password
_content
}}"
when
:
debian_version != "jessie"
no_log
:
true
tags
:
...
...
@@ -101,7 +105,8 @@
-
sssd
# taken out of Debian's post install hooks
-
name
:
ensure sssd is configured in nsswitch.conf
-
name
:
ensure sssd is configured in nsswitch.conf
# noqa 301 306
# yamllint disable-line rule:line-length
shell
:
"
sed
-i
--regexp-extended
'/^(passwd|group|shadow|netgroup|services):/
{
/
\\
bsss
\\
b/!
s/$/
sss/
}
'
/etc/nsswitch.conf"
args
:
...
...
@@ -117,7 +122,7 @@
tags
:
-
sssd
-
name
:
ensure we have a cronjob which renews krb creden
i
tials once a day
-
name
:
ensure we have a cronjob which renews krb credentials once a day
template
:
src
:
templates/renew_krb5.j2
dest
:
/etc/cron.daily/renew_krb5
...
...
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