Yes, a primary Ansible play can contain minor "sub-plays" which are also known as blocks. Blocks allow users to divide a play into smaller pieces that can be executed separately. Blocks can be useful in cases where a certain group of tasks in a play should only be run if a condition is met or if a particular task fails. By using blocks, users can avoid having to create separate plays for each task or condition.
Asked: 2021-10-11 11:00:00 +0000
Seen: 8 times
Last updated: Feb 19 '22