[ Prev ] [ Index ] [ Next ]

Registering

Created Samstag 08 Februar 2020


This is to use task results in later tasks as variables.



Example

- hosts: web_servers

  tasks:

     - shell: /usr/bin/foo
       register: foo_result
       ignore_errors: True

     - shell: /usr/bin/bar
       when: foo_result.rc == 5

On success/failure/skip