ansible-collections / ansible.posix

Ansible Collection for Posix
Other
157 stars 152 forks source link

mount: Warning displayed when using opts parameter without using boot parameter #522

Closed cwchristerw closed 8 months ago

cwchristerw commented 9 months ago
SUMMARY

I'm using community.crypto.luks_device and ansible.posix.mount module to mount encrypted disk to remote servers. Its possible to get warning about boot parameter being ignored due to using opts parameter with noauto in it. In my opinion warning should only be displayed when user has set boot parameter. Because default behaviour is to ignore opts parameter when it includes noauto, there shouldn't warning when boot parameter isn't set.

[WARNING]: Ignore the 'boot' due to 'opts' contains 'noauto'.

https://github.com/ansible-collections/ansible.posix/blob/c77c592fc632ecc5ce55b2449bce2f73d96446ae/plugins/modules/mount.py#L742-L743

ISSUE TYPE
COMPONENT NAME

mount module

ANSIBLE VERSION
ansible [core 2.16.2]
  config file = /home/user/ansible/ansible.cfg
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/ansible/lib/python3.10/site-packages/ansible
  ansible collection location = /home/user/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/opt/ansible/bin/python3)
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS