blob: 703b7f9b38f7d1189c915ce8f514f4152375284c [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
- name: Verify {{ metron_ui_directory }} exists
file:
path: "{{ metron_ui_directory }}"
state: directory
mode: 0755
owner: root
group: root
- name: Archive metron-ui on localhost
shell: tar --exclude='./node_modules' -czf {{ metron_temp_archive }} .
args:
chdir: "{{ playbook_dir }}/../../metron-ui"
creates: "{{ metron_temp_archive }}"
warn: false #Warns to use unarchive - unarchive does not archive
become: false
delegate_to: localhost
run_once: true
- name: Extract metron-ui tarball
unarchive:
src: "{{ metron_temp_archive }}"
dest: "{{ metron_ui_directory }}"
creates: "{{ metron_ui_directory}}/config"
- name: Delete {{ metron_temp_archive }}
local_action: file path="{{ metron_temp_archive }}" state=absent
become: false
run_once: true