---
# 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

- name: loop over users_user_list
  include: user.yml
  with_items:
    - "{{ users_user_list }}"
  loop_control:
    label: "{{ user.name }}"
    loop_var: user

- name: manage cron permission
  template:
    src: cron.allow.j2
    dest: /etc/cron.allow
