deploy web wip

This commit is contained in:
2022-11-12 14:43:59 +01:00
parent dbbf9f5e7d
commit dc5ce05094
5 changed files with 31 additions and 21 deletions

View File

@@ -1,25 +1,29 @@
---
# tasks file for deploy-web
- name: debug local
- name: git archive {{ item }}
local_action:
module: git
repo: "git@gitlab.secu.pcc:descartes/isr-inventory.git"
dest: "/home/provisioner/src/isr-inventory"
archive: "/tmp/isr-inventory.tar.gz"
repo: "https://{{ git_username | urlencode }}:{{ git_password | urlencode }}@git.valczeryba.ovh/v4l3n71n/{{ project_name }}.git"
dest: "/home/valentin/src/"
archive: "/tmp/{{ item }}.tar.gz"
force: yes
track_submodules: yes
update: yes
key_file: "/home/provisioner/.ssh/id_rsa_toolbox"
run_once: True
become: yes
become_user: provisioner
with_items: "{{ project_name }}"
when: "project_name is defined"
- name: Create directory
- name: Create directory {{ item }}
file:
path: "/home/admloc/isr-inventory"
path: "/var/www/{{ item }}"
state: directory
with_items: "{{ project_name }}"
when: "project_name is defined"
- name: Extract repo isr
- name: Extract repo {{ item }}
unarchive:
src: "/tmp/isr-inventory.tar.gz"
dest: "/home/admloc/isr-inventory"
src: "/tmp/{{ item }}.tar.gz"
dest: "/var/www/{{ item }}"
with_items: "{{ project_name }}"
when: "project_name is defined"