Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.

Commit

Permalink
fix: preferably use module_role_path
Browse files Browse the repository at this point in the history
  • Loading branch information
saitho committed Nov 19, 2020
1 parent adffe82 commit d9d63e2
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion __tests__/test-tf-generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
- name: Generate Caddyfile
import_tasks: "../tasks/steps/generate-caddyfile-tf.yml"
vars:
role_path: ".."
module_role_path: ".."
caddy_root: "."
2 changes: 1 addition & 1 deletion tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
with_items: "{{ app_config.domains }}"

- name: Generate Caddy Terraform file
include_tasks: "{{ role_path }}/tasks/steps/generate-serverconfig-tf.yml"
include_tasks: "{{ module_role_path|default(role_path) }}/tasks/steps/generate-serverconfig-tf.yml"

2 changes: 1 addition & 1 deletion tasks/load-config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
- include_vars:
file: "{{ role_path }}/stackhead-module.yml"
file: "{{ module_role_path|default(role_path) }}/stackhead-module.yml"
name: "{{ include_varname }}"
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
- include_tasks: "{{ role_path }}/tasks/{{ stackhead_action }}.yml"
- include_tasks: "{{ module_role_path|default(role_path) }}/tasks/{{ stackhead_action }}.yml"
2 changes: 1 addition & 1 deletion tasks/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
vars:
caddy_install_source: package
- name: Overwrite Caddyfile
include_tasks: "{{ role_path }}/tasks/steps/generate-caddyfile-tf.yml"
include_tasks: "{{ module_role_path|default(role_path) }}/tasks/steps/generate-caddyfile-tf.yml"
- name: Restart Caddy
command: /bin/true
notify:
Expand Down
2 changes: 1 addition & 1 deletion tasks/steps/generate-caddyfile-tf.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- block:
- template:
src: "{{ role_path }}/templates/caddy/Caddyfile.j2"
src: "{{ module_role_path|default(role_path) }}/templates/caddy/Caddyfile.j2"
dest: "{{ dest_file }}"
- block:
- slurp: src="{{ dest_file }}"
Expand Down
2 changes: 1 addition & 1 deletion tasks/steps/generate-serverconfig-tf.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- block:
- template:
src: "{{ role_path }}/templates/terraform/caddy_server.tf.j2"
src: "{{ module_role_path|default(role_path) }}/templates/terraform/caddy_server.tf.j2"
dest: "{{ dest_file }}"
force: true
- block:
Expand Down

0 comments on commit d9d63e2

Please sign in to comment.