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
src: index.html.j2
dest: /var/www/index.html
- name: synchronise data to production stage
- name: get IP address of development host
syncip: "{{ hostvars[inventory_hostname] | get_host_control_ip() }}"
- name: start synchronising
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
- 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