ANXS / nginx

A fairly flexible and feature full Ansible role for the NGINX web server.
MIT License
151 stars 82 forks source link

relative paths are broken when using ansible2.0.0beta3 #65

Closed iamjochem closed 8 years ago

iamjochem commented 9 years ago

the src attributes in various tasks/module/*.yml files are incorrect (or incompable with upcoming asible version) .e.g.

you have this (does not work):

# file: nginx/tasks/modules/authorized_ips.yml

- name: Nginx | Modules | Updated the authorized_ip file
  template:
    src: ../../templates/modules/authorized_ips.j2
    dest: "{{nginx_dir}}/authorized_ips"
    owner: root
    group: root
    mode: 0644

I had to change it to this (works):

# file: nginx/tasks/modules/authorized_ips.yml

- name: Nginx | Modules | Updated the authorized_ip file
  template:
    src: modules/authorized_ips.j2
    dest: "{{nginx_dir}}/authorized_ips"
    owner: root
    group: root
    mode: 0644

it seems that ansible changed the way relative paths in 'template' module parameters are resolved (I have no experience with current/previous ansible version - so this is an educated guess).

PS - I'm an ansible noob - go easy :-)

gillesdemey commented 8 years ago

+1, this is a blocking issue for us

farridav commented 8 years ago

We have started to check ansible 2 compatible issues on these roles and hope to have this looked at within the next couple of days.. Thanks for raising

gillesdemey commented 8 years ago

Thanks for the quick fix @farridav 🙌