Outils pour utilisateurs

Outils du site


tech:ansible_awx_-_tower_cli

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_awx_-_tower_cli [2025/09/01 10:18] Jean-Baptistetech:ansible_awx_-_tower_cli [2025/12/03 10:33] (Version actuelle) Jean-Baptiste
Ligne 10: Ligne 10:
 <code bash> <code bash>
 pip3 install awxkit pip3 install awxkit
 +
 +export AWXKIT_API_BASE_PATH=/api/controller/
 +
 awx --help awx --help
 </code> </code>
Ligne 26: Ligne 29:
 #awx login --conf.host "$TOWER_HOST" --conf.username "$TOWER_USERNAME" --conf.password "$TOWER_PASSWORD" -k #awx login --conf.host "$TOWER_HOST" --conf.username "$TOWER_USERNAME" --conf.password "$TOWER_PASSWORD" -k
 awx login awx login
 +awx ping | jq
 </code> </code>
  
 Export Export
 <code bash> <code bash>
-awx --conf.host $TOWER_HOST --conf.token "TOKEN" export --projects "PLOP" > projects_PLOP.json +awx --conf.host $TOWER_HOST --conf.token "TOKEN" export --projects "PLOP" > projects_PLOP.json 
-awx --conf.host $TOWER_HOST --conf.token "TOKEN" export --inventory "PLOP" > inventory_PLOP.json+awx --conf.host $TOWER_HOST --conf.token "TOKEN" export --inventory "PLOP" > inventory_PLOP.json
  
 awx export --job_templates 42 awx export --job_templates 42
 awx export --job_template "plop" > tpl_plop.json awx export --job_template "plop" > tpl_plop.json
 awx export --credentials "IOPS_GIT" > credentials_IOPS_GIT.json awx export --credentials "IOPS_GIT" > credentials_IOPS_GIT.json
 +
 +
 +# Exemple avec : http://localhost:3000/#/inventories/inventory/4/sources/15/details
 +awx export --inventory 4
 +# Il ne faut pas le numero de l'inventaire, mais celui de la source
 +awx export --inventory_source 15
 +
 +awx -f yaml export > all.yaml
 </code> </code>
 +
  
  
Ligne 77: Ligne 90:
 * https://fak3r.com/2019/01/17/automate-ansible-tower-cli/ * https://fak3r.com/2019/01/17/automate-ansible-tower-cli/
  
-<code bash tower-job.sh>+ 
 +''tower-job.sh'' 
 +<code bash>
 #!/bin/bash #!/bin/bash
  
tech/ansible_awx_-_tower_cli.1756714702.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki