--- # tasks file for users - name: create local ssh_key_directory file: path: "{{ users_ssh_key_directory }}" state: directory delegate_to: localhost become: no - name: loop over users_group_list include: group.yml with_items: - "{{ users_group_list }}" loop_control: label: "{{ group.name }}" loop_var: group when: - users_group_list is defined - name: loop over users_user_list include: user.yml with_items: - "{{ users_user_list }}" loop_control: label: "{{ user.name }}" loop_var: user when: - users_user_list is defined - name: manage cron permission template: src: cron.allow.j2 dest: /etc/cron.allow when: users_cron_allow|bool - name: check existence of /etc/cron.allow file: path: /etc/cron.allow state: absent when: not users_cron_allow|bool