Ansible offers many filters and conditionals. As far as I can tell; it should be possible to implement an Ansible playbook that executes a set of tasks that achieve the same outcome as a Turing Complete language. So, is it Turing Complete?
1 Answer
I think it is.
- Ansible can generate yaml files and run itself upon it (both may be done as
local_action
), which is a rough equivalent ofeval()
function. - Ansible can create lists and iterate over them. Together with
include_role
it opens ability to run arbitrary complex code within loop (with conditions). - Together with
until
keyword it allows to create classic while/until loop. block
withwhere
statement allows branching. Even within loops.
Moreover, playbook-related plugins are counted as a valid way to extend playbook, therefore they provide full python features.