Compare commits
7 Commits
v.0.1.2-ge
...
v.0.1.4-ge
Author | SHA1 | Date | |
---|---|---|---|
|
c06fca73e5 | ||
ec5ced5f1e | |||
2125919329 | |||
|
62e1e0435b | ||
167dce745b | |||
6caa30b4be | |||
1fb8100c32 |
67
automate.sh
67
automate.sh
@@ -11,54 +11,23 @@ export https_proxy="http://10.121.38.1:8080/"
|
||||
echo "Voulez-vous récupérer les fichiers du dépôt ou effectuer un push sur le dépôt ? [1 = Pull, 2 = Push]"
|
||||
read answer
|
||||
|
||||
echo "Quelle branche est concernée ? [1 = main, 2 = test]"
|
||||
read branch
|
||||
|
||||
if [ $branch == 1 ] ; then
|
||||
if [ $answer == 1 ] ; then
|
||||
git checkout main
|
||||
echo "Récupération des fichiers à jour, branche main..."
|
||||
git pull -q origin main
|
||||
echo "Fichiers à jour récupérés."
|
||||
else
|
||||
git checkout main
|
||||
echo "Ajout des fichiers au Gitea..."
|
||||
sleep 1
|
||||
git add .
|
||||
echo "Commit en cours..."
|
||||
sleep 1
|
||||
git commit
|
||||
echo "Entrez la version du tag:"
|
||||
read tag
|
||||
git tag $tag
|
||||
echo "Push des fichiers au Gitea, branche main..."
|
||||
sleep 1
|
||||
git push -q origin main --tag
|
||||
fi
|
||||
|
||||
elif [ $branch == 2 ] ; then
|
||||
if [ $answer == 1 ] ; then
|
||||
git checkout test
|
||||
echo "Récupération des fichiers à jour dans la branche test..."
|
||||
git pull -q origin test
|
||||
echo "Fichiers à jour récupérés."
|
||||
else
|
||||
git checkout test
|
||||
echo "Ajout des fichiers au Gitea, branche test..."
|
||||
sleep 1
|
||||
git add .
|
||||
echo "Commit en cours..."
|
||||
sleep 1
|
||||
git commit
|
||||
echo "Entrez la version du tag:"
|
||||
read tag
|
||||
git tag $tag
|
||||
echo "Push des fichiers au Gitea, branche test..."
|
||||
sleep 1
|
||||
git push -q origin test --tag
|
||||
fi
|
||||
|
||||
if [ $answer == 1 ] ; then
|
||||
git checkout main
|
||||
echo "Récupération des fichiers à jour, branche main..."
|
||||
git pull -q origin main
|
||||
echo "Fichiers à jour récupérés."
|
||||
else
|
||||
echo "Choisissez une branche et une option valide. Veuillez relancer le script"
|
||||
|
||||
git checkout main
|
||||
echo "Ajout des fichiers au Gitea..."
|
||||
sleep 1
|
||||
git add .
|
||||
echo "Commit en cours..."
|
||||
sleep 1
|
||||
git commit
|
||||
echo "Entrez la version du tag:"
|
||||
read tag
|
||||
git tag $tag
|
||||
echo "Push des fichiers au Gitea, branche main..."
|
||||
sleep 1
|
||||
git push -q origin main --tag
|
||||
fi
|
||||
|
@@ -1,2 +1,2 @@
|
||||
Fichier hosts utilisé pour ansible lors du TP de la séance 16.
|
||||
Sont inclus les fichiers idempotents .yml d'ansible que j'ai fait.
|
||||
Sont inclus les fichiers idempotents .yml d'ansible que j'ai fait, ainsi que le dossier avec tous les playbooks pour le DokuWiki.
|
||||
|
6
bts_annee_2/sisr2/ansible/dokuw/hosts
Normal file
6
bts_annee_2/sisr2/ansible/dokuw/hosts
Normal file
@@ -0,0 +1,6 @@
|
||||
[adm]
|
||||
infra
|
||||
|
||||
[web]
|
||||
web1
|
||||
web2
|
4
bts_annee_2/sisr2/ansible/dokuw/local.yml
Normal file
4
bts_annee_2/sisr2/ansible/dokuw/local.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- hosts: web
|
||||
roles:
|
||||
- web
|
||||
- doku
|
10
bts_annee_2/sisr2/ansible/dokuw/main.yml
Normal file
10
bts_annee_2/sisr2/ansible/dokuw/main.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
- name: 1. Installe les paquets requis pour le DokuWiki
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items:
|
||||
- apache2
|
||||
- php
|
||||
- php-mbstring
|
||||
- php-gd
|
||||
- php-xml
|
Reference in New Issue
Block a user