---
- name: Add tbb-team users
  user:
      name: "{{ item }}"
      state: present
      groups: tbb-build
      shell: /bin/bash
  with_items: "{{ tbb_team_members }}"

- name: Add ssh keys to authorized_keys
  authorized_key:
      user: "{{ item }}"
      state: present
      key: "{{ lookup('file', item + '.pub') }}"
  with_items: "{{ tbb_team_members }}"

- name: Remove tbb-team alums users
  user:
      name: "{{ item }}"
      state: absent
      remove: yes
  with_items: "{{ tbb_team_alums }}"
