Balise bash + syntaxe
This commit is contained in:
parent
f099f4a633
commit
aa4f1bc903
|
@ -1421,14 +1421,14 @@ Vous pouvez le forcer en utilisant l'option `-e 'ansible_python_interpreter=/usr
|
|||
|
||||
Pour enregistrer la sortie d'exécution d'un playbook dans un fichier HTML (en gardant les couleurs et les warnings qui vont normalement sur la sortie d'erreur), on peut utiliser le paquet `aha` :
|
||||
|
||||
~~~
|
||||
$ ANSIBLE_FORCE_COLOR=true ansible-playbook playbook.yml 2>&1 | aha --black > output.html
|
||||
~~~
|
||||
```bash
|
||||
ANSIBLE_FORCE_COLOR=true ansible-playbook playbook.yml 2>&1 | aha --black > output.html
|
||||
```
|
||||
|
||||
Si on veut quand même avoir la sortie dans son terminal :
|
||||
|
||||
```sh
|
||||
$ ANSIBLE_FORCE_COLOR=true ansible-playbook playbook.yml 2>&1 | tee /dev/fd/2 | aha > playbook_output.html
|
||||
```bash
|
||||
ANSIBLE_FORCE_COLOR=true ansible-playbook playbook.yml 2>&1 | tee /dev/fd/2 | aha > playbook_output.html
|
||||
```
|
||||
|
||||
## Exemples
|
||||
|
|
Loading…
Reference in a new issue