Created
May 7, 2025 10:19
-
-
Save zeitounator/69a6ab46d237ebda57f1e8baeee0a2ec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat test.yml | |
- hosts: localhost | |
gather_facts: false | |
tasks: | |
- name: Test task | |
ansible.builtin.debug: | |
msg: This task runs | |
loop: [1,2,3,4] | |
when: item < 3 | |
$ ansible-playbook test.yml | |
PLAY [localhost] ************************************************************************************************************************************************************************************************** | |
TASK [Test task] ************************************************************************************************************************************************************************************************** | |
ok: [localhost] => (item=1) => { | |
"msg": "This task runs" | |
} | |
ok: [localhost] => (item=2) => { | |
"msg": "This task runs" | |
} | |
skipping: [localhost] => (item=3) | |
skipping: [localhost] => (item=4) | |
PLAY RECAP ******************************************************************************************************************************************************************************************************** | |
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment