top | item 23006135

(no title)

piroux | 5 years ago

To define something as declarative or imperative, it is important to compare the definition model to the execution model.

So I would rather say that Ansible is much less declarative than Terraform, because Ansible tasks (the different steps of an Ansible Playbook) are executed sequentially.

The tasks of Ansible are its statements, so yeah we would say that each Ansible task is declarative. And still, a requirement for that would be for the task to use a module/role which is idempotent, right? Another proof, Ansible natively offers loop, blocks, and conditional to control the execution flow throughout its tasks.

(This is not a critic of Ansible. I am happy to use it as is, as a high-level scripting mechanism.)

discuss

order

No comments yet.