ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
833 stars 1.53k forks source link

[PR #8938/1d86d496 backport][stable-9] ipa_getkeytab: Create module #8995

Closed patchback[bot] closed 1 month ago

patchback[bot] commented 1 month ago

This is a backport of PR #8938 as merged into main (1d86d49688ea0f0adedc2eed30e70dbd21e4f80d).

SUMMARY

ipa_getkeytab as a fancy wrapper around ipa-getkeytab command

ISSUE TYPE
COMPONENT NAME

ipa_getkeytab

ADDITIONAL INFORMATION

Pretty much a simple wrapper around a ipa-getkeytab using cmd_runner I tested this module by my hands and it seems to work as intended I don't know how to write unit tests because for integration test I would need FreeIPA server and client installed so i wrote something up using test_npm as a source

# Before this module you would have to do something like this
    - name: Create keytab
      ansible.builtin.shell: ipa-getkeytab -s <ipa_server> -p <some_principal> -k <some_path>

# Now you can do this like this
    - name: Create keytab
      community.general.ipa_getkeytab:
        path: <some_path>
        principal: <some_principal>
        ipa_server:  <ipa_server>
ansibullbot commented 1 month ago

cc @Akasurde @Nosmoht @abakanovskii @justchris1 click here for bot help