Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |
| wiki:ansible [2024/05/15 08:45] – 5.152.82.90 | wiki:ansible [2024/10/29 13:27] (current) – 5.152.82.90 |
|---|
| **Check variable** | **Check variable** |
| <code>ansible -i inventories/ -m debug -a "msg={{ ((users|default([])|selectattr('ssh_key','defined')|list|first).ssh_key|split('-'))[1] }}" host</code> | <code>ansible -i inventories/ -m debug -a "msg={{ ((users|default([])|selectattr('ssh_key','defined')|list|first).ssh_key|split('-'))[1] }}" host</code> |
| | |
| | **Install packege** |
| | <code>ansible -i inventories/ -m apt -a "name=package" host</code> |