-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipaautomountmap: add support for indirect maps #1075
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
The "mount point" option is missing in PR#1075
-
The "automount map indirect" should be successfully added without the parent option.
-
Noticed an wrong error message when trying to add an indirect map
tasks:
- ipaautomountmap:
ipaadmin_principal: admin
ipaadmin_password:
automountlocation: 01automuntmap_testlocation
name: 01_automountmap_testmap
mount: indirect
TASK [ipaautomountmap] *************************************************************************************************************
task path: /root/02map.yaml:7
fatal: [master.ipadomain.test]: FAILED! => {"changed": false, "msg": "automountmap_add: 01automuntmap_testlocation: Unknown option: key"}
PLAY RECAP *************************************************************************************************************************
master.ipadomain.test : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
CLI Console output:
[root@master ~]# ipa automountmap-add-indirect 01automuntmap_testlocation 01_automountmap_testmap
Mount point: /usr/share/test
---------------------------------------------
Added automount map "01_automountmap_testmap"
---------------------------------------------
Map: 01_automountmap_testmap
from this PR, the expected options |
18cb327
to
26eb5e6
Compare
@varunmylaraiah I believe I have fixed all this issues, but I found a few more, so the patch is a little more complex. I've also reviewed the names used in the command-line and fixed both in the module and the README file (a second pair of eyes to check consistency would be really nice). |
@rjeffman Thanks for the quick fix. yes, all issues have been fixed. However, I'm still unsure about how to provide a mount point for an indirect map. In CLI, it appears that we cannot add an automount map indirectly without specifying a mount point.
|
So, for the CLI you can use something like:
Use This same command translates to the task: - ipaautomountmap:
ipaadmin_password: SomeADMINpassword
location: my_location
name: indirect_map
mount: indirect There is no Note that deleting an automount map created with |
26eb5e6
to
1e09bc6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
New test cases for the automount map of type "indirect" have been successfully passed in the downstream
@@ -54,6 +54,19 @@ Example playbook to ensure presence of an automount map: | |||
desc: "this is a map for servers in the DMZ" | |||
``` | |||
|
|||
Example playbook to ensure an indirect automount map is present: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explain what an indirect map is and what it is used for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. I also added a new example playbook for indirect maps.
1e09bc6
to
5553d10
Compare
Indirect maps were not supported by ansible-freeipa ipaautomountmap. This patch adds support for adding indirect automount maps using the "parent" and "mount" parameters, if the map do not yet exist. An existing map cannot be modified. The "parent" parameter must match an existing automount map, and the "mount" parameter is required if "parent" is used. A new example playbook can be found at: playbooks/automount/automount-map-indirect-map.yml A new test playbook was added to test the feature: tests/automount/test_automountmap_indirect.yml
5553d10
to
a33fcf4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Indirect maps were not supported by ansible-freeipa ipaautomountmap. This patch adds support for adding indirect automount maps using the "parent" and "mount" parameters, if the map do not yet exist. An existing map cannot be modified.
The "parent" parameter must match an existing automount map, and the "mount" parameter is required if "parent" is used.
A new test playbook was added to test the feature:
Related:
Fixes #804