deploy web wip
This commit is contained in:
parent
dbbf9f5e7d
commit
dc5ce05094
@ -1,5 +0,0 @@
|
|||||||
[defaults]
|
|
||||||
remote_user = admloc
|
|
||||||
private_key_file = /home/provisioner/.ssh/id_rsa_toolbox
|
|
||||||
inventory = hosts
|
|
||||||
|
|
12
inventory/host_vars/vps-host
Normal file
12
inventory/host_vars/vps-host
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
39343765633561393532373365313435383266313661663666643731356262633063643761633662
|
||||||
|
3732306165616334373164303133336565343939643939330a353635613432313230356237306330
|
||||||
|
39653132363064323961396162383563303334323930396338303566656632663666626337303662
|
||||||
|
3338323062366239650a366338346462363565343735643930663338376537343962656534393732
|
||||||
|
36363331353832626261656461636636613332643964336634353963313332356366663739363238
|
||||||
|
65356661333639313666383931323363306165643038653164313939376637386666303661363737
|
||||||
|
63386466373961623736656635633433333461353435646336323738636334353337313535333663
|
||||||
|
30356236363561613630666465663464383965376162653164613431616336336466316330376430
|
||||||
|
61396238626364656461666163623234316533663234613931623138376564303236633163626337
|
||||||
|
66303734346561613636353239646461626439303537393265353532323233656536663362636164
|
||||||
|
656534363934393039623035656335353839
|
1
inventory/hosts
Normal file
1
inventory/hosts
Normal file
@ -0,0 +1 @@
|
|||||||
|
vps-host ansible_connection=ssh ansible_host=51.222.107.37 ansible_port=2424 ansible_user=valentin
|
@ -1,25 +1,29 @@
|
|||||||
---
|
---
|
||||||
# tasks file for deploy-web
|
# tasks file for deploy-web
|
||||||
- name: debug local
|
|
||||||
|
- name: git archive {{ item }}
|
||||||
local_action:
|
local_action:
|
||||||
module: git
|
module: git
|
||||||
repo: "git@gitlab.secu.pcc:descartes/isr-inventory.git"
|
repo: "https://{{ git_username | urlencode }}:{{ git_password | urlencode }}@git.valczeryba.ovh/v4l3n71n/{{ project_name }}.git"
|
||||||
dest: "/home/provisioner/src/isr-inventory"
|
dest: "/home/valentin/src/"
|
||||||
archive: "/tmp/isr-inventory.tar.gz"
|
archive: "/tmp/{{ item }}.tar.gz"
|
||||||
force: yes
|
force: yes
|
||||||
track_submodules: yes
|
|
||||||
update: yes
|
update: yes
|
||||||
key_file: "/home/provisioner/.ssh/id_rsa_toolbox"
|
with_items: "{{ project_name }}"
|
||||||
run_once: True
|
when: "project_name is defined"
|
||||||
become: yes
|
|
||||||
become_user: provisioner
|
|
||||||
|
|
||||||
- name: Create directory
|
|
||||||
|
- name: Create directory {{ item }}
|
||||||
file:
|
file:
|
||||||
path: "/home/admloc/isr-inventory"
|
path: "/var/www/{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
with_items: "{{ project_name }}"
|
||||||
|
when: "project_name is defined"
|
||||||
|
|
||||||
- name: Extract repo isr
|
|
||||||
|
- name: Extract repo {{ item }}
|
||||||
unarchive:
|
unarchive:
|
||||||
src: "/tmp/isr-inventory.tar.gz"
|
src: "/tmp/{{ item }}.tar.gz"
|
||||||
dest: "/home/admloc/isr-inventory"
|
dest: "/var/www/{{ item }}"
|
||||||
|
with_items: "{{ project_name }}"
|
||||||
|
when: "project_name is defined"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user