Commit 08105e1a authored by Hinrikus Wolf's avatar Hinrikus Wolf

nfs-server: add condition for checking if krb is needed

parent 71dd8db7
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
- config - config
- name: ensure nfs-server is enabled and running - name: ensure nfs-server is enabled and running
service: name=nfs-server state=running enabled=yes service: name=nfs-server state=started enabled=yes
tags: tags:
- nfs-server - nfs-server
- service - service
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
tags: tags:
- nfs-server - nfs-server
- service-principal - service-principal
when: nfs_krb is defined
- name: check that we have a valid service principal - name: check that we have a valid service principal
shell: klist -k /etc/krb5.keytab | grep "nfs/{{ ansible_fqdn }}" shell: klist -k /etc/krb5.keytab | grep "nfs/{{ ansible_fqdn }}"
...@@ -63,6 +64,7 @@ ...@@ -63,6 +64,7 @@
tags: tags:
- nfs-server - nfs-server
- service-principal - service-principal
when: nfs_krb is defined
- block: - block:
- name: create service principal - name: create service principal
...@@ -124,5 +126,6 @@ ...@@ -124,5 +126,6 @@
- nfs-server - nfs-server
- service-principal - service-principal
when: principal.rc == 1 when: principal.rc == 1
when: nfs_krb is defined
- meta: flush_handlers - meta: flush_handlers
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment