S
Size: a a a
S
S
S
S
S
AG
S
EG
R
---inventories/local:
- name: Generate nginx vhosts
template:
src=templates/{{ item.template }}
dest="/home/ansible/ansible_playbooks/test.conf"
with_items: nginx_vhosts
nginx_vhosts:playbook.yml:
- name: sandbox_ssl
template: 'vhost_base.j2'
server_name:
- 'example'
security_headers: yes
ssl:
certificate: '/etc/letsencrypt/live/example/fullchain.pem'
certificate_key: '/etc/letsencrypt/live/example/privkey.pem'
locations:
-
pattern: /
extras:
- 'deny all'
-ошибка вылетает:
hosts: localhost
roles:
-
role: nginx
tags: nginx_local_test
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible.utils.unsafe_proxy.AnsibleUnsafeText object' has no attribute
'template'\n\nThe error appears to be in '/home/ansible/ansible_playbooks/roles/nginx/tasks/main.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact sy
ntax problem.\n\nThe offending line appears to be:\n\n---\n- name: Generate nginx vhosts\n ^ here\n"}
D
КТ
AG
КТ
AG
AG
DL