Outils pour utilisateurs

Outils du site


tech:ansible_collection

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:ansible_collection [2025/11/04 21:20] Jean-Baptistetech:ansible_collection [2025/11/13 12:02] (Version actuelle) Jean-Baptiste
Ligne 40: Ligne 40:
 collections: collections:
   - name: https://git.acme.local/ansible_collections/my_collection   - name: https://git.acme.local/ansible_collections/my_collection
-    type: git+    type: git 
 +    scm: git
     version: master     version: master
 </code> </code>
Ligne 110: Ligne 111:
 </code> </code>
  
-<code yaml play.yml>+''play.yml'' 
 +<code yaml>
 #!/usr/bin/env ansible-playbook #!/usr/bin/env ansible-playbook
 --- ---
Ligne 159: Ligne 161:
 collections: collections:
   - name: https://git.acme.fr/ansible-automation-platform/PlaybooksGroupe/dns_cache_enable   - name: https://git.acme.fr/ansible-automation-platform/PlaybooksGroupe/dns_cache_enable
-    type: git+    type: git 
 +    scm: git
 </code> </code>
  
Ligne 170: Ligne 173:
  
  
-<code yaml galaxy.yml>+''galaxy.yml'' 
 +<code yaml>
 --- ---
  
Ligne 184: Ligne 188:
 </code> </code>
  
-<code yaml tasks/main.yml>+ 
 +''tasks/main.yml'' 
 +<code yaml>
  
 - name: Enable local cache DNS - name: Enable local cache DNS
Ligne 233: Ligne 239:
  
  
------------------ 
  
-Créer un paquet d'un role 
-<code bash> 
-tar czvf ./role_name.tar.gz ./role_name 
-</code> 
- 
-La documentation est dans : 
-* meta/main.yml 
-* README.md 
- 
-Installer un role 
-<code bash> 
-ansible-galaxy install ./role_name.tar.gz 
-ansible-galaxy install role_name 
-</code> 
- 
-Par défaut dans ''~/.ansible/roles/'' 
- 
- 
-Voir : 
-  * ansible-galaxy list 
-  * ansible-galaxy search  
-  * ansible-galaxy install 
-  * ansible-galaxy import 
-  * ansible-galaxy info 
- 
- 
------ 
- 
-Dépendances 
- 
-<code yaml> 
-dependencies: 
-  - { role: common, version: "1.2.3" } 
-  - { role: webserver, version: ">=2.0.0" } 
-  - { role: database, tags: ["database"] } 
-  - { role: 'xcode', when: ansible_os_family == 'Darwin' } 
-</code> 
  
  
tech/ansible_collection.1762287620.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki