keytab checks

This commit is contained in:
nazunalika 2021-01-04 01:38:13 -07:00
parent b60dcb31c4
commit cdce2cc45e
2 changed files with 47 additions and 0 deletions

View File

@ -24,6 +24,19 @@
success_msg: "We are able to run on this node" success_msg: "We are able to run on this node"
fail_msg: "/etc/no-ansible exists - skipping run on this node" fail_msg: "/etc/no-ansible exists - skipping run on this node"
- name: Check for keytabs - kojid
stat:
path: /etc/kojid.keytab
register: kojid_keytab
changed_when: "1 != 1"
- name: Verify keytab
assert:
that:
- "kojid_keytab.stat.exists"
success_msg: "It is likely we have all keytabs"
fail_msg: "There are no keytabs. Please build the keytabs."
# EPEL and PowerTools are required for ipsilon to function # EPEL and PowerTools are required for ipsilon to function
# I also couldn't find an ansible built-in to do this # I also couldn't find an ansible built-in to do this
- name: Enable the PowerTools repository - name: Enable the PowerTools repository

View File

@ -24,6 +24,40 @@
success_msg: "We are able to run on this node" success_msg: "We are able to run on this node"
fail_msg: "/etc/no-ansible exists - skipping run on this node" fail_msg: "/etc/no-ansible exists - skipping run on this node"
- name: Check for keytabs - web
stat:
path: /etc/keytabs/koji-web.keytab
register: koji_keytab
changed_when: "1 != 1"
- name: Check for keytabs - kojira
stat:
path: /etc/keytabs/kojira.keytab
register: kojira_keytab
changed_when: "1 != 1"
- name: Check for keytabs - gc
stat:
path: /etc/keytabs/koji-gc.keytab
register: gc_keytab
changed_when: "1 != 1"
- name: Check for keytabs - host
stat:
path: /etc/keytabs/host.keytab
register: host_keytab
changed_when: "1 != 1"
- name: Verify keytab
assert:
that:
- "koji_keytab.stat.exists"
- "kojira_keytab.stat.exists"
- "gc_keytab.stat.exists"
- "host_keytab.stat.exists"
success_msg: "It is likely we have all keytabs"
fail_msg: "There are no keytabs. Please build the keytabs."
# EPEL and PowerTools are required for ipsilon to function # EPEL and PowerTools are required for ipsilon to function
# I also couldn't find an ansible built-in to do this # I also couldn't find an ansible built-in to do this
- name: Enable the PowerTools repository - name: Enable the PowerTools repository