Setting up kerberos

I must be looking at the wrong places. I would like to see an
example of setting up kerberos using a task file, but all I find is
how to make ansible authenticate using kerberos. Suggestions?

This is a very vague question, what exactly are you wanting to do when you say “setting up kerberos” and someone might be able to help.

Are you looking to setup a KDC?
Install client packages?
Setup the config files?

Are you looking to setup a KDC?
Install client packages?
Setup the config files?

Oops. I meant deploy a client from package to config.

Are you looking to setup a KDC?
Install client packages?
Setup the config files?

Oops. I meant deploy a client from package to config.

      Let me elaborate: I think getting the packages for centos would
go something like this

  - name: Install kerberos
    yum:
       name: {{ item }}
       update_cache: yes
       state: latest
       with_items:
          - krb5-workstation
          - krb5-libs
          - krb5-auth-dialog

Then we have the client config side of the show

I’ve created a role that can do what you are looking for but it includes things outside of Kerberos and more specific for that task at hand https://github.com/jborean93/ansible-windows/tree/master/vagrant-linux/roles/kerberos. What you really need is 2 tasks;

  1. Install the kerb/gssapi packages using the package tool you require (yum/apt/dnf…)
  2. Template out a copy of the krb5.conf file with the configuration on your environment
    The 1st step is easy, the 2nd step is really up to what your krb5.conf file looks like. The documentation around this file and what each option/section does can be found here https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html.

Thanks

Jordan