-
Notifications
You must be signed in to change notification settings - Fork 200
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
Add an inherit_kerberos role #1574
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
- name: "Install client packages on Red Hat based distributions" | ||
ansible.builtin.dnf: | ||
name: | ||
- "krb5-workstation" | ||
- "krb5-libs" | ||
state: present | ||
when: ansible_os_family == "RedHat" | ||
|
||
- name: "Install client packages on Debian based distributions" | ||
ansible.builtin.apt: | ||
name: "krb5-user" | ||
state: present | ||
when: ansible_os_family == "Debian" | ||
|
||
- name: "Copy Kerberos client configuration from Host" | ||
ansible.builtin.copy: | ||
src: "{{ inherit_kerberos_config }}" | ||
dest: /etc/krb5.conf | ||
owner: root | ||
group: root | ||
mode: '0644' | ||
when: inherit_kerberos_config is defined | ||
|
||
- name: "Copy Kerberos credential cache from Host" | ||
ansible.builtin.copy: | ||
src: "{{ inherit_kerberos_ccache }}" | ||
dest: "{{ inherit_kerberos_ccache }}" | ||
owner: "{{ inherit_kerberos_local_user_name }}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. where does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was originally written to be part of the So with the request to split this out into more of a standalone role, instead I assume that the value will be provided by whatever role or playbook I create in the future that includes this role. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, got it! |
||
group: "{{ inherit_kerberos_local_user_groupname | default(inherit_kerberos_local_user_name) }}" | ||
mode: '0600' | ||
when: inherit_kerberos_ccache is defined |
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.
you culd use
ansible.builtin.package
which works across distros, and load the correct list of packages using a vars file.forklift/roles/bats/tasks/main.yml
Line 3 in 12c6385
forklift/roles/bats/vars/RedHat.yml
Line 2 in 12c6385
Not saying you have to, but something to consider :)