Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
sso-lqdn
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Conditions générales et politique de confidentialité
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
LQDN Adminsys
piops-roles
sso-lqdn
Validations
63bdbfba
Valider
63bdbfba
rédigé
il y a 2 ans
par
nono
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Update checking for updates
parent
dd46f61a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
1
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
tasks/update-service.yml
+23
-15
23 ajouts, 15 suppressions
tasks/update-service.yml
avec
23 ajouts
et
15 suppressions
tasks/update-service.yml
+
23
−
15
Voir le fichier @
63bdbfba
# Update the keycloak installation
-
name
:
Checking for pre-existing installation
stat
:
path
:
"
{{
keycloak_base_path
}}/keycloak-{{
keycloak_previous_version
}}"
register
:
is_there_an_existing_keycloak
# Check if there is a keycloak directory in the base_path
-
name
:
Check for existing keycloak installation
find
:
paths
:
"
{{
keycloak_base_path
}}/keycloak-*"
file_type
:
"
directory"
depth
:
1
register
:
keycloak_existing_installations
-
name
:
Printing status of pre-existing installation
debug
:
msg
:
"
{{
is_there_an_existing_keycloak
}}"
-
name
:
Checking if there is an existing installation that needs to be updated
block
:
# We need to extract the version of each directory and add them to a list
# If so, what is it's version ? ( cut from "keycloak-$version ")
-
name
:
Check existing versions from directorie's names
set_fact
:
keycloak_list_of_versions="{{ keycloak_existing_installations.files | map(attribute='path') | regex_search('-([0-9]+\.[0-9]+\.[0-9]+\b)$') | list }}"
# Compare such version to the one given
-
name
:
Compare every version with the keycloak_version
set_fact
:
keycloak_needs_an_update="keycloak_list_of_versions | version(keycloak_list_of_versions, "<") | reject(false, omit) | list"
# If the $old_version < $new_version, we need to update
# They may be multi keycloak directories
when
:
keycloak_existing_installations.matched >=
1
-
name
:
Updating if
needed
-
name
:
Updating if
keycloak needs an update
block
:
# Stop the service
-
name
:
Stopping the service for the update.
...
...
@@ -28,12 +41,7 @@
# Upgrade the server
#- name: Upgrading the server with the new files
# This is actually reinstalling the files.
when
:
is_there_an_existing_keycloak.stat.exists
-
name
:
Update state
debug
:
msg
:
"
No
update
done."
when
:
not is_there_an_existing_keycloak.stat.exists
when
:
true
in keycloak_needs_an_update
-
name
:
Force systemd to reread configs
become
:
yes
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter