Ansible hostpattern for ansible connection

Aperta
#602 8 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
ansible, python

Direzione di ricerca

Start at the testinfra_hosts entry point and review the Ansible host-pattern documentation linked in the issue, using the play.yaml examples as context. Verify how a pattern such as db:&Prod or db:&Dev should select hosts, and define completion around tests showing the expected environment-specific selection.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement question

Hi,

Is there any way to pass the ansible hostpattern to testinfra_hosts? I have dynamic inventory which provides all the hosts from Prod and Dev environments. I'm working with them like:

ansible-playbook play.yaml --limit Prod
ansible-playbook play.yaml --limit Dev

But both environments have the same groups (db, web, app). Can I pass host pattern like 'db:&Prod' to testinfra_hosts ?

https://docs.ansible.com/ansible/latest/user_guide/intro_patterns.html

Lingua principale
Python
Stelle
2.5k
Fork
359
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pytest-dev/pytest-testinfra

Tutte le issue di pytest-dev/pytest-testinfra

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.