Only run devaccess tasks on nodes that have a devaccess user
- name: Load tiered_access variables
include_vars: /opt/config/tiered_access_vars.yml
+- name: Check if the devaccess user is present on the host system
+ stat:
+ path: "/host/home/{{ tar_username }}"
+ register: tar_user_homedir
+
+- when: tar_user_homedir.stat.exists == True
+ block:
- name: Setup authorized keys for developer user
template:
src: /opt/config/devaccess_authorized_keys.j2
