Created
March 24, 2019 13:48
-
-
Save ernesen/04b956cd0848129ea7909fda6b77d758 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Install GitLab | |
hosts: gitLab | |
become: true | |
tasks: | |
- name: Checking to make sure postfix is installed | |
apt: | |
name: | |
- postfix | |
- mailutils | |
- ca-certificates | |
- curl | |
- openssh-server | |
state: present | |
tags: [postfix] | |
when: ansible_os_family == 'Debian' | |
- name: Install GitLab repository | |
get_url: | |
url: https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | |
dest: /tmp/script.deb.sh | |
mode: 0777 | |
- name: Run GitLab repository script | |
shell: /tmp/script.deb.sh | |
- name: Install GitLab CE | |
package: | |
name: | |
- gitlab-ce | |
state: latest | |
update_cache: yes | |
- name: Run ufw allow http script | |
command: ufw allow http | |
- name: Run ufw allow https script | |
command: ufw allow https | |
- name: Run ufw allow OpenSSH script | |
command: ufw allow OpenSSH | |
- name: Restart with reconfigure | |
command: gitlab-ctl reconfigure | |
- name: GitLab Restart with restart | |
command: gitlab-ctl restart | |
- name: GitLab gitlab-runsvdir status | |
command: service gitlab-runsvdir status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment