diff --git a/roles/webgateway/tasks/main.yaml b/roles/webgateway/tasks/main.yaml index 3146fd9..1af6144 100644 --- a/roles/webgateway/tasks/main.yaml +++ b/roles/webgateway/tasks/main.yaml @@ -98,6 +98,18 @@ group: root mode: '0644' +- name: "Checkout static websites from git" + ansible.builtin.git: + repo: "{{ item.repo }}" + dest: "{{ item.directory }}" + with_items: "{{ static }}" + +- name: "Remove .git directory from static websites" + ansible.builtin.file: + path: "{{ item.directory}}/.git" + state: absent + with_items: "{{ static }}" + - name: Validate nginx configuration command: cmd: nginx -t diff --git a/roles/webgateway/vars/main.yaml b/roles/webgateway/vars/main.yaml index 08aef90..8cfd530 100644 --- a/roles/webgateway/vars/main.yaml +++ b/roles/webgateway/vars/main.yaml @@ -10,7 +10,7 @@ proxy: - {domain: swagger.kmlabz.com, ip: swagger.stargate.internal} static: - - {domain: tormakristof.eu, directory: /var/www/tormakristof.eu} - - {domain: tormakris.dev, directory: /var/www/tormakristof.eu} - - {domain: torma.xyz, directory: /var/www/tormakristof.eu} - - {domain: kmlabz.com, directory: /var/www/kmlabz.com} + - {domain: tormakristof.eu, directory: /var/www/tormakristof.eu, repo: "https://git.kmlabz.com/kmlabz/homepage.git"} + - {domain: tormakris.dev, directory: /var/www/tormakristof.eu, repo: "https://git.kmlabz.com/kmlabz/homepage.git"} + - {domain: torma.xyz, directory: /var/www/tormakristof.eu, repo: "https://git.kmlabz.com/kmlabz/homepage.git"} + - {domain: kmlabz.com, directory: /var/www/kmlabz.com, repo: "https://git.kmlabz.com/kmlabz/homepage.git"}