Hands-on task
This task is step 11 of the course “Terraform and Ansible”
Ansible: config from a template
Write a playbook /root/tpl.yml and a Jinja2 template that generate /etc/myapp.conf from the variable port with the value 9090. The finished file should contain the line listen 9090. The playbook must create /etc/myapp.conf where the file doesn't exist yet, and a second run must change nothing.
What you'll practise:
- ansible
- template module
- jinja2
- vars variables
- ansible-playbook