Ask Your Question
3

Can a primary Ansible play contain minor "sub-plays"?

asked 2021-10-11 11:00:00 +0000

woof gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-02-19 06:00:00 +0000

lalupa gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-10-11 11:00:00 +0000

Seen: 8 times

Last updated: Feb 19 '22