---

# Installation tasks

- name : Import aptly GPG key
  become : True
  apt_key :
    id : "{{ aptly_gpg_key }}"
    keyserver : "{{ aptly_gpg_keyserver }}"
    state : 'present'

- name : Install aptly repository
  become : True
  apt_repository :
    repo : "{{ aptly_repository }}"
    update_cache : True
    state : 'present'

- name : Create aptly user
  become : True
  user :
    name : "{{ aptly_user }}"
    comment : 'User for aptly repository management'
    home : "{{ aptly_user_home }}"
    shell : '/bin/bash'

- name : Change home permission
  become : True
  file :
    dest : "{{ aptly_user_home }}"
    mode : '0700'

- name : Install aptly package
  become : True
  apt :
    name : "{{ item }}"
    cache_valid_time : 3600
    update_cache : True
    state : 'present'
  with_items: "{{ aptly_packages }}"


---

# Installation tasks

- name : Import aptly GPG key
  become : True
  apt_key :
    id : "{{ aptly_gpg_key }}"
    keyserver : "{{ aptly_gpg_keyserver }}"
    state : 'present'

- name : Install aptly repository
  become : True
  apt_repository :
    repo : "{{ aptly_repository }}"
    update_cache : True
    state : 'present'

- name : Create aptly user
  become : True
  user :
    name : "{{ aptly_user }}"
    comment : 'User for aptly repository management'
    home : "{{ aptly_user_home }}"
    shell : '/bin/bash'
    uid: "{{ aptly_uid | default(omit) }}"

- name : Change home permission
  become : True
  file :
    dest : "{{ aptly_user_home }}"
    mode : '0700'

- name : Install aptly package
  become : True
  apt :
    name : "{{ item }}"
    cache_valid_time : 3600
    update_cache : True
    state : 'present'
  with_items: "{{ aptly_packages }}"


Add the possibility to have consistent uid for aptly user
Add the possibility to have consistent uid for aptly user

If someone needs to recreate aptly over and over again, he would
probably want to have full consistency and control over the uid
used by aptly.

This patch adds the possibility to define aptly_uid. If defined,
the uid of aptly user will be set, if not the current behavior is
unchanged.
