+ Nginx setup and git tea service installation

This commit is contained in:
shockrah 2022-01-21 14:48:34 -08:00
parent f85a7c5646
commit 6baf6dcf5a
4 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,30 @@
---
- hosts: leftcoastlab
become: yes
vars:
GITEA_VOLUME: gitea-volume
tasks:
- name: Import Vars required for configuration
include_vars:
dir: ../vars
- name: Create Gitea Volume
community.docker.docker_volume:
name: "{{GITEA_VOLUME}}"
- name: Update/Install Git Tea Container Service
community.docker.docker_container:
name: gitea
image: gitea/gitea
pull: yes
restart_policy: always
recreate: yes
volumes:
- "{{GITEA_VOLUME}}:/data"
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "{{GITEA_PUB_PORT}}:3000"
- "{{GITEA_SSH_PORT}}:22"

View File

@ -13,12 +13,17 @@
- gnupg - gnupg
- software-properties-common - software-properties-common
- lsb-release - lsb-release
- python3-pip
- name: Install Docker - name: Install Docker
apt: apt:
name: docker.io name: docker.io
update_cache: yes update_cache: yes
- name: Install Docker Ansible Driver
pip:
name: docker

View File

@ -0,0 +1,36 @@
---
- hosts: leftcoastlab
become: yes
vars:
STATIC_USER: staticweb
tasks:
- name: Install Nginx Package
apt:
name: nginx
update_cache: yes
state: present
- name: Stop Apache2 Service
systemd:
name: apache2
state: stopped
enabled: no
- name: Remove Apache2
apt:
name: apache2
state: absent
- name: website user account
user:
name: "{{STATIC_USER}}"
comment: Static Website maintainer account
state: present
- name: Create Static web root directory
file:
path: /var/www
state: directory
recurse: yes
owner: "{{STATIC_USER}}"
group: "{{STATIC_USER}}"

View File

@ -1,3 +1,5 @@
--- ---
# vars file for setup # vars file for setup
DEBIAN_CODENAME: sid DEBIAN_CODENAME: sid
GITEA_PUB_PORT: 3000
GITEA_SSH_PORT: 2222