I have this play.yml
---
- hosts: 127.0.0.1
connection: local
sudo: false
tasks:
- include: apache.yml
My Apache look
Whenever you have a module followed by a variable on the same line in ansible the parser will treat the reference variable as the beginning of an in-line dictionary. For example:
- name: some example
command: {{ myapp }} -a foo
The default here is to parse the first part of {{ myapp }} -a foo
as a dictionary instead of a string and you will get an error.
So you must quote the argument like so:
- name: some example
command: "{{ myapp }} -a foo"