diff --git a/docker-host/setup/tasks/git-stack.yml b/docker-host/setup/tasks/git-stack.yml new file mode 100644 index 0000000..551cd8c --- /dev/null +++ b/docker-host/setup/tasks/git-stack.yml @@ -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" + + diff --git a/docker-host/setup/tasks/install-docker.yml b/docker-host/setup/tasks/install-docker.yml index f6072a8..971f6f8 100644 --- a/docker-host/setup/tasks/install-docker.yml +++ b/docker-host/setup/tasks/install-docker.yml @@ -13,12 +13,17 @@ - gnupg - software-properties-common - lsb-release + - python3-pip - name: Install Docker apt: name: docker.io update_cache: yes + - name: Install Docker Ansible Driver + pip: + name: docker + diff --git a/docker-host/setup/tasks/nginx.yml b/docker-host/setup/tasks/nginx.yml new file mode 100644 index 0000000..9de99fd --- /dev/null +++ b/docker-host/setup/tasks/nginx.yml @@ -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}}" diff --git a/docker-host/setup/vars/main.yml b/docker-host/setup/vars/main.yml index 138cc87..8cefcd9 100644 --- a/docker-host/setup/vars/main.yml +++ b/docker-host/setup/vars/main.yml @@ -1,3 +1,5 @@ --- # vars file for setup DEBIAN_CODENAME: sid +GITEA_PUB_PORT: 3000 +GITEA_SSH_PORT: 2222