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
c2a3424b
Commit
c2a3424b
authored
7 years ago
by
Thomas Schneider
Browse files
Options
Downloads
Patches
Plain Diff
Use autofs iff it is configured for a host, else fstab
parent
6cbf8c79
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
nfs-client/handlers/main.yml
+1
-0
1 addition, 0 deletions
nfs-client/handlers/main.yml
nfs-client/tasks/main.yml
+68
-34
68 additions, 34 deletions
nfs-client/tasks/main.yml
with
69 additions
and
34 deletions
nfs-client/handlers/main.yml
+
1
−
0
View file @
c2a3424b
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
-
name
:
restart autofs
-
name
:
restart autofs
service
:
name=autofs state=restarted
service
:
name=autofs state=restarted
when
:
automount
-
name
:
restart nfs-client
-
name
:
restart nfs-client
service
:
name=nfs-client.target state=restarted
service
:
name=nfs-client.target state=restarted
...
...
This diff is collapsed.
Click to expand it.
nfs-client/tasks/main.yml
+
68
−
34
View file @
c2a3424b
...
@@ -91,6 +91,9 @@
...
@@ -91,6 +91,9 @@
-
nfs-client
-
nfs-client
-
service
-
service
-
name
:
Configure automount
when
:
automount
block
:
-
name
:
ensure there is a base directory for automount
-
name
:
ensure there is a base directory for automount
file
:
state=directory path=/net owner=root group=root mode=0755
file
:
state=directory path=/net owner=root group=root mode=0755
notify
:
notify
:
...
@@ -126,6 +129,37 @@
...
@@ -126,6 +129,37 @@
tags
:
tags
:
-
nfs-client
-
nfs-client
-
name
:
Configure fstab nfs mounts
when
:
not automount
block
:
-
name
:
Disable automounter
service
:
name
:
autofs
state
:
stopped
enabled
:
no
tags
:
-
nfs-client
-
service
-
name
:
Ensure mountpoints are directories
file
:
path
:
"
/{{item.dest}}"
state
:
directory
with_items
:
"
{{nfs_shares}}"
tags
:
-
nfs-client
-
name
:
Create fstab entries
mount
:
fstype
:
"
nfs"
src
:
"
{{item.src}}"
path
:
"
/{{item.dest}}"
opts
:
"
{{item.options}}"
state
:
mounted
with_items
:
"
{{nfs_shares}}"
tags
:
-
nfs-client
-
name
:
configure default umask and other user related stuff
-
name
:
configure default umask and other user related stuff
copy
:
src=login.defs dest=/etc/login.defs owner=root group=root mode=0644
copy
:
src=login.defs dest=/etc/login.defs owner=root group=root mode=0644
tags
:
tags
:
...
...
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