--- - name: Chech if version is passed assert: that: - CI_PIPELINE_ID is defined - name: Create a directory for trusted-certs file: path: "/etc/gitlab/trusted-certs" state: directory mode: '0755' - 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 - name: Create a directory for configs file: path: "/opt/gitlab.rb" state: directory mode: '0755' - name: Template a file to /opt/gitlab.rb/_version_ copy: content: | {{ gitlab_config }} dest: "/opt/gitlab.rb/{{ CI_PIPELINE_ID }}" owner: root group: root mode: 0644 - name: Create a hard link to /opt/gitlab.rb/_version_ file: src: "/opt/gitlab.rb/{{ CI_PIPELINE_ID }}" dest: /etc/gitlab/gitlab.rb owner: root group: root mode: 0644 state: hard force: yes notify: Reconfigure gitlab