Does Ansible support inclusion of no-op/empty/placeholder tasks?

In some test frameworks, we can start a test suite by providing a list of empty tests. Then we can implement the tests one by one.

Similarly, I want to start a playbook by only providing the set of tasks I want to execute, without implementing them:

  • hosts: localhost
    tasks:
  • name: Step 1
  • name: Step 2
  • name: Step 3

But this is invalid syntax in Ansible.

Any workarounds available to do this?

The easiest way is to use the debug module and you can output an empty string, it would work like this

  • name: test 1
    debug:
    msg: “”

  • name: test 2
    debug:
    msg: “”

You can also use meta: noop but it isn’t recommended for general use, it would work like this

  • name: test 1
    meta: noop

  • name: test 2
    meta: noop

Thanks

Jordan