Commit 9619aad9 authored by Pietsch, Martin's avatar Pietsch, Martin

added development productive environment support

parent 81a22d52
---
# defaults file for function.helloworld/
\ No newline at end of file
......@@ -4,7 +4,23 @@
name: function
tasks_from: update
- set_fact:
synchost: "{{ inventory_hostname | regex_replace('^' + system_development_prefix, system_productive_prefix) }}"
- name: generate demo index.html
template:
src: index.html.j2
dest: /var/www/index.html
- name: synchronise data to production stage
block:
- name: get IP address of development host
set_fact:
syncip: "{{ hostvars[inventory_hostname] | get_host_control_ip() }}"
- name: start synchronising
get_url:
url: "http://{{ syncip }}/index.html"
dest: /var/www/index.html
delegate_to: "{{ synchost }}"
when: (inventory_hostname != synchost) and (synchost in groups['all'])
---
function_update_stage: "development"
function_update_run_once: False
function_packages:
- name: "lighttpd"
container: false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment