This commit is contained in:
nazunalika 2021-01-24 16:00:57 -07:00
parent 9a194464ed
commit b0a8a91d88
2 changed files with 26 additions and 2 deletions

View File

@ -28,13 +28,13 @@
- name: Check for keytabs - kojid - name: Check for keytabs - kojid
stat: stat:
path: /etc/kojid.keytab path: /etc/kojid.keytab
register: kojid_keytab register: kojid_keytab_check
changed_when: "1 != 1" changed_when: "1 != 1"
- name: Verify keytab - name: Verify keytab
assert: assert:
that: that:
- "kojid_keytab.stat.exists" - "kojid_keytab_check.stat.exists"
success_msg: "It is likely we have all keytabs" success_msg: "It is likely we have all keytabs"
fail_msg: "There are no keytabs. Please build the keytabs." fail_msg: "There are no keytabs. Please build the keytabs."
@ -77,6 +77,9 @@
state: present state: present
post_tasks: post_tasks:
- name: "Setup shared filesystem mount"
import_tasks: tasks/koji_efs.yml
- name: Touching run file that ansible has ran here - name: Touching run file that ansible has ran here
file: file:
path: /var/log/ansible.run path: /var/log/ansible.run

View File

@ -0,0 +1,21 @@
---
# Sets up the EFS mount for /mnt/koji {{ koji_efs_mount_path }}
# Requires amazon-efs-utils; included
#
- name: Installing amazon-efs-utils
yum:
name: amazon-efs-utils
state: present
tags:
- amazon_efs_utils
- packages
- name: "Creating and mounting {{ koji_efs_fsid }} at {{ koji_efs_mount_path }}"
ansible.posix.mount:
path: "{{ koji_efs_mount_path }}"
src: "{{ koji_efs_fsid }}:/"
fstype: "{{ koji_efs_fs_type }}"
opts: "{{ koji_efs_fs_opts | join(',') }}"
state: "{{ koji_efs_fs_state | default('mounted') }}"
tags:
- mounts