File tree 2 files changed +25
-4
lines changed
tests/integration/targets/mount/tasks
2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -804,6 +804,7 @@ def main():
804
804
805
805
dirs_created = []
806
806
if not os .path .exists (name ) and not module .check_mode :
807
+ old_umask = None
807
808
if umask is not None :
808
809
if not isinstance (umask , int ):
809
810
try :
Original file line number Diff line number Diff line change 343
343
file :
344
344
state : directory
345
345
path : /tmp/mount_source
346
- - name : Bind mount a filesystem (Linux)
346
+ - name : Bind mount a filesystem with umask
347
347
mount :
348
348
src : /tmp/mount_source
349
- name : /tmp/mount_dest
349
+ path : /tmp/mount_dest
350
350
state : mounted
351
351
fstype : None
352
352
opts : bind
353
353
umask : 0777
354
+ when : ansible_system != 'FreeBSD'
355
+ - name : Bind mount a filesystem with umask(FreeBSD)
356
+ mount :
357
+ src : /tmp/mount_source
358
+ path : /tmp/mount_dest
359
+ state : mounted
360
+ fstype : nullfs
361
+ opts : bind
362
+ umask : 0777
363
+ when : ansible_system == 'FreeBSD'
354
364
- name : Unmount FS to access underlying directory
355
365
command : |
356
366
umount /tmp/mount_dest
366
376
file :
367
377
path : /tmp/mount_dest
368
378
state : absent
369
- - name : Mount the FS to non existent directory with string umask
379
+ - name : Bind mount a filesystem with string umask
370
380
mount :
371
381
src : /tmp/mount_source
372
- name : /tmp/mount_dest
382
+ path : /tmp/mount_dest
373
383
state : mounted
374
384
fstype : None
375
385
opts : bind
376
386
umask : " 0777"
387
+ when : ansible_system != 'FreeBSD'
388
+ - name : Bind mount a filesystem with string umask(FreeBSD)
389
+ mount :
390
+ src : /tmp/mount_source
391
+ path : /tmp/mount_dest
392
+ state : mounted
393
+ fstype : nullfs
394
+ opts : bind
395
+ umask : " 0777"
396
+ when : ansible_system == 'FreeBSD'
377
397
- name : Unmount FS to access underlying directory
378
398
command : |
379
399
umount /tmp/mount_dest
You can’t perform that action at this time.
0 commit comments