Skip to content
Snippets Groups Projects
Commit 6f73b58e authored by Kamil Andoniadis's avatar Kamil Andoniadis
Browse files

fix condition and template destination name

parent 179fbeb7
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
- name: setup virtualhost - name: setup virtualhost
include_tasks: virtualhost.yml include_tasks: virtualhost.yml
when: apache_virtualhost when: apache_virtualhost is defined and apache_virtualhost
- name: set the listening port - name: set the listening port
lineinfile: lineinfile:
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
- name: copy virtualhost configuration template - name: copy virtualhost configuration template
template: template:
src: '{{ apache_virtualhost }}' src: '{{ apache_virtualhost }}'
dest: /etc/apache2/sites-available dest: '/etc/apache2/sites-available/{{ apache_virtualhost | regex_search("^.*(?=\.j2)") }}'
when: 'apache_virtualhost is match("^.*\.j2$")' when: 'apache_virtualhost is match("^.*\.j2$")'
- name: enable apache sites - name: enable apache sites
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment