Newer
Older
config_date_time: "{{ ansible_date_time.date }}_{{ ansible_date_time.hour }}-{{ ansible_date_time.minute }}-{{ ansible_date_time.second }}"
update_cache: yes
state: present
pkg:
- curl
- openssh-server
- ca-certificates
- tzdata
- perl
- gnupg
- apt-transport-https
update_cache: yes
state: present
pkg:
- debian-archive-keyring
when: ansible_distribution == 'Debian'
- name: Add an Apt signing key, uses whichever key is at the URL
ansible.builtin.apt_key:
url: https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
state: present
- name: Add specified repository into sources list
ansible.builtin.apt_repository:
repo: https://packages.gitlab.com/gitlab/gitlab-ce/{{ ansible_distribution | lower }}/ {{ ansible_distribution_release | lower }} main
filename: gitlab_gitlab-ce
state: present
# - name: Create a directory for trusted-certs
# file:
# path: "/etc/gitlab/trusted-certs"
# state: directory
# mode: '0755'
# - name: Install and configure external ssl
# block:
# - name: Create a directory for ssl
# file:
# path: "/etc/gitlab/ssl"
# state: directory
# mode: '0755'
# - name: Create a symbolic link to /opt/ssl/fullchain.pem
# file:
# src: /opt/ssl/fullchain.pem
# dest: "/etc/gitlab/ssl/{{ item }}.crt"
# owner: root
# group: root
# state: link
# loop: "{{ gitlab_hostnames }}"
# notify: Reconfigure gitlab
# - name: Create a symbolic link to /opt/ssl/privkey.pem
# file:
# src: /opt/ssl/privkey.pem
# dest: "/etc/gitlab/ssl/{{ item }}.key"
# owner: root
# group: root
# state: link
# loop: "{{ gitlab_hostnames }}"
# notify: Reconfigure gitlab
# when: gitlab_custom_ssl|default(False) == False