mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-03-09 19:15:19 +01:00
Compare commits
7 commits
3cc70c4bb3
...
b6d30f8b30
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6d30f8b30 | ||
|
|
d36a289deb | ||
|
|
60c8d23c7f | ||
|
|
f392e407f9 | ||
|
|
c77c592fc6 | ||
|
|
02006a1e7f | ||
|
|
1512495dd7 |
5 changed files with 31 additions and 7 deletions
3
changelogs/fragments/346-boot-linux.yml
Normal file
3
changelogs/fragments/346-boot-linux.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
bugfix:
|
||||||
|
- mount - Handle ``boot`` option on Linux, NetBSD and OpenBSD correctly (https://github.com/ansible-collections/ansible.posix/issues/364).
|
||||||
3
changelogs/fragments/490_doc_authorized_key_path.yml
Normal file
3
changelogs/fragments/490_doc_authorized_key_path.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
bugfixes:
|
||||||
|
- "Bugfix in the documentation regarding the path option for authorised_key(https://github.com/ansible-collections/ansible.posix/issues/483)."
|
||||||
|
|
@ -28,8 +28,10 @@ options:
|
||||||
required: true
|
required: true
|
||||||
path:
|
path:
|
||||||
description:
|
description:
|
||||||
- Alternate path to the authorized_keys file.
|
- Alternative path to the authorized_keys file.
|
||||||
- When unset, this value defaults to I(~/.ssh/authorized_keys).
|
- The default value is the C(.ssh/authorized_keys) of the home of the user specified in the O(user) parameter.
|
||||||
|
- Most of the time, it's not necessary to set this key.
|
||||||
|
- Use the path to your target authorized_keys if you need to explicitly point on it.
|
||||||
type: path
|
type: path
|
||||||
manage_dir:
|
manage_dir:
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -840,11 +840,8 @@ def main():
|
||||||
args['warnings'].append("Ignore the 'boot' due to 'opts' contains 'noauto'.")
|
args['warnings'].append("Ignore the 'boot' due to 'opts' contains 'noauto'.")
|
||||||
elif not module.params['boot']:
|
elif not module.params['boot']:
|
||||||
args['boot'] = 'no'
|
args['boot'] = 'no'
|
||||||
if 'defaults' in opts:
|
opts.append('noauto')
|
||||||
args['warnings'].append("Ignore the 'boot' due to 'opts' contains 'defaults'.")
|
args['opts'] = ','.join(opts)
|
||||||
else:
|
|
||||||
opts.append('noauto')
|
|
||||||
args['opts'] = ','.join(opts)
|
|
||||||
|
|
||||||
# If fstab file does not exist, we first need to create it. This mainly
|
# If fstab file does not exist, we first need to create it. This mainly
|
||||||
# happens when fstab option is passed to the module.
|
# happens when fstab option is passed to the module.
|
||||||
|
|
|
||||||
|
|
@ -467,6 +467,25 @@
|
||||||
that:
|
that:
|
||||||
- mount_info['opts'] == 'rw,user,async,noauto'
|
- mount_info['opts'] == 'rw,user,async,noauto'
|
||||||
|
|
||||||
|
- name: Unmount FS
|
||||||
|
ansible.posix.mount:
|
||||||
|
path: /tmp/myfs
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: Mount the FS with noauto option and defaults
|
||||||
|
ansible.posix.mount:
|
||||||
|
path: /tmp/myfs
|
||||||
|
src: /tmp/myfs.img
|
||||||
|
fstype: ext3
|
||||||
|
state: mounted
|
||||||
|
boot: no
|
||||||
|
register: mount_info
|
||||||
|
|
||||||
|
- name: Assert the mount without noauto was successful
|
||||||
|
ansible.builtin.assert:
|
||||||
|
that:
|
||||||
|
- "'noauto' in mount_info['opts'].split(',')"
|
||||||
|
|
||||||
- name: Unmount FS
|
- name: Unmount FS
|
||||||
ansible.posix.mount:
|
ansible.posix.mount:
|
||||||
path: /tmp/myfs
|
path: /tmp/myfs
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue