---

- name: Create build user
  user:
    name: "{{ rpm_user }}"
    system: True
    home: "{{ rpm_root_dir }}"
    generate_ssh_key: True
    ssh_key_file: .ssh/id_rsa
  tags: rpm

- name: Create builder group
  group:
    name: "{{ rpm_build_group }}"
  tags: rpm

- name: Add build user to the mock group
  user:
    name: "{{ rpm_user }}"
    append: True
    groups:
      - mock
  tags: rpm
