2022-11-12 14:43:59 +01:00

30 lines
750 B
YAML

---
# tasks file for deploy-web
- name: git archive {{ item }}
local_action:
module: git
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
update: yes
with_items: "{{ project_name }}"
when: "project_name is defined"
- name: Create directory {{ item }}
file:
path: "/var/www/{{ item }}"
state: directory
with_items: "{{ project_name }}"
when: "project_name is defined"
- name: Extract repo {{ item }}
unarchive:
src: "/tmp/{{ item }}.tar.gz"
dest: "/var/www/{{ item }}"
with_items: "{{ project_name }}"
when: "project_name is defined"