diff --git a/Cargo.toml b/Cargo.toml index 9eba1b6..520e528 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,5 +31,5 @@ assets = [ ["target/release/peach-dyndns-server", "usr/bin/", "755"], ["debian/reloadbind", "usr/bin/", "755"], ["debian/bindctl", "/etc/sudoers.d/bindctl", "655"], - ["templates/*", "/srv/peachcloud/peach-dyndns-server/prod-peach-dyndns/templates/", "644"], + ["templates/*", "/srv/peach-dyndns-server/templates/", "644"], ] \ No newline at end of file diff --git a/Rocket.toml b/Rocket.toml index 39eb01a..5e10931 100644 --- a/Rocket.toml +++ b/Rocket.toml @@ -1,3 +1,3 @@ [default] -template_dir = "templates/" +template_dir = "devops/templates/templates" port = 3001 diff --git a/devops/setup_server.yml b/devops/setup_server.yml index 50bf9aa..aac4cce 100644 --- a/devops/setup_server.yml +++ b/devops/setup_server.yml @@ -85,6 +85,19 @@ path: /srv/peach-dynddns-server state: directory + - name: create templates directory + file: + path: /srv/peach-dynddns-server/templates + state: directory + + - name: Copy zonefile.tera + template: + src: "templates/templates/zonefile.tera" + dest: /srv/peach-dyndns-server/templates/zonefile.tera + owner: root + group: bind + mode: 0644 + - name: Create dynserver nginx site conf template: src: "templates/dynserver_nginx.conf" diff --git a/templates/zonefile.tera b/devops/templates/templates/zonefile.tera similarity index 100% rename from templates/zonefile.tera rename to devops/templates/templates/zonefile.tera