From 73aea389b4925fb5e405a0332a3bf9653133f36b Mon Sep 17 00:00:00 2001 From: Polaire Date: Thu, 30 Jan 2025 17:17:13 +0100 Subject: [PATCH] Actualiser 01 - Infrastructure Azure --- 01 - Infrastructure Azure.-.md | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/01 - Infrastructure Azure.-.md b/01 - Infrastructure Azure.-.md index 7424fe3..98d6358 100644 --- a/01 - Infrastructure Azure.-.md +++ b/01 - Infrastructure Azure.-.md @@ -24,31 +24,48 @@ az login autorisations d’accès. | | --scopes "/subscriptions/" | Définit la portée des permissions. Ici, on applique le rôle à tout l’abonnement Azure. Tu dois remplacer par l’ID de ton abonnement | - - - - - - +``` { "appId": "212debe2-a0fa-XXXX-9aa5-97f7524036cf", "displayName": "AnsibleServicePrincipal", "password": "LALALALALALAL", "tenant": "LETENANT" } -b- Configurer Ansible pour utiliser le Service Principal +``` + +## b- Configurer Ansible pour utiliser le Service Principal + On utilise un fichier de configuration : Créer un fichier ~/.azure/credentials et ajouter : + + +``` [default] subscription_id=12345678-XXXX-cdef-1234-567890abcdef client_id=11111111-2222-3333-4444-555555555555 secret=your-secret-password tenant=66666666-7777-8888-9999-000000000000 +``` + + + Clé Signification appId Client ID → Identifiant unique de ton Service Principal dans Azure AD. password Client Secret → Mot de passe généré pour authentifier le Service Principal. tenant Tenant ID → Identifiant de ton Azure Active Directory (AAD). subscriptionId Identifiant de ton abonnement Azure. + +| Clés | Signification | +| -------- | -------- | +| appId | Client ID → Identifiant unique de ton Service Principal dans Azure AD | +| password | Client Secret → Mot de passe généré pour authentifier le Service Principal. | +| tenant | Tenant ID → Identifiant de ton Azure Active Directory (AAD). | +| subscriptionId | Identifiant de l'abonnement Azure. | + + + + + A ajouter dans le fichier yml : - name: Configurer l'authentification Azure via fichier credentials copy: