Compare commits

..

7 Commits

5 changed files with 39 additions and 50 deletions

View File

@@ -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

View File

@@ -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.

View File

@@ -0,0 +1,6 @@
[adm]
infra
[web]
web1
web2

View File

@@ -0,0 +1,4 @@
- hosts: web
roles:
- web
- doku

View 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