Ansible# 15 - Register in Variables Output from System Commands - register and Python List

  Рет қаралды 952

DevLinux

DevLinux

Күн бұрын

Ansible provides ways to print results from system commands if they return any. Some results are almost always available such as Return Code or Exit Status.
We see that the Ansible Adhoc command does nor require any extra code to print results from a command. However, when running a command from within an Ansible Playbook, we need to create a variable that can be used to store results.
Watch this video to understand:
- How to capture output and register it into a variable
- How to use a Python List
- How to apply a condition with the "when" statement to mark a task for execution or skip
- How to use the "in" operator which is widely used in Python collections such as List and Dictionary

Пікірлер
отомстил?
00:56
История одного вокалиста
Рет қаралды 6 МЛН
Пришёл к другу на ночёвку 😂
01:00
Cadrol&Fatich
Рет қаралды 10 МЛН
POV: Your kids ask to play the claw machine
00:20
Hungry FAM
Рет қаралды 16 МЛН
Worst flight ever
00:55
Adam W
Рет қаралды 7 МЛН
Ansible when conditional explained - Part 9
17:58
Rahul Wagh
Рет қаралды 3,6 М.
How to Do 90% of What Plugins Do (With Just Vim)
1:14:03
thoughtbot
Рет қаралды 895 М.
отомстил?
00:56
История одного вокалиста
Рет қаралды 6 МЛН