mirror of
https://github.com/BreizhHardware/cours-ISEN-MD.git
synced 2026-01-18 16:47:24 +01:00
Obisidian vault auto-backup: 12-01-2026 11:07:20 on . 1 files edited
This commit is contained in:
@@ -19,4 +19,52 @@ mdp : moutarde42
|
||||
git:
|
||||
repo: 'https://github.com/arnaudmorin/demo-flask.git'
|
||||
dest: /root/demo-flask
|
||||
```
|
||||
|
||||
### Step3
|
||||
```yaml
|
||||
---
|
||||
- hosts: demo
|
||||
gather_facts: yes
|
||||
tasks:
|
||||
- name: Install the git package
|
||||
apt:
|
||||
name: git
|
||||
state: present
|
||||
- name: Clone my flask application
|
||||
git:
|
||||
repo: 'https://github.com/arnaudmorin/demo-flask.git'
|
||||
dest: /root/demo-flask
|
||||
- name: Install pip
|
||||
apt:
|
||||
name: python3-pip
|
||||
state: present
|
||||
- name: Install flask requirements
|
||||
pip:
|
||||
requirements: /root/demo-flask/requirements.txt
|
||||
```
|
||||
|
||||
### Step4
|
||||
```yaml
|
||||
---
|
||||
- hosts: demo
|
||||
gather_facts: yes
|
||||
tasks:
|
||||
- name: Install the git package
|
||||
apt:
|
||||
name: git
|
||||
state: present
|
||||
- name: Clone my flask application
|
||||
git:
|
||||
repo: 'https://github.com/arnaudmorin/demo-flask.git'
|
||||
dest: /root/demo-flask
|
||||
- name: Install pip
|
||||
apt:
|
||||
name: python3-pip
|
||||
state: present
|
||||
- name: Install flask requirements
|
||||
pip:
|
||||
requirements: /root/demo-flask/requirements.txt
|
||||
- name: Start the flask application in background
|
||||
shell: "nohup /root/demo-flask/start.sh &"
|
||||
```
|
||||
Reference in New Issue
Block a user