From 00826d9f9131b5b3d76d01c13912496ec6067204 Mon Sep 17 00:00:00 2001 From: "carey.xu" Date: Mon, 14 Mar 2016 15:38:33 +0800 Subject: seperate apache2 installtion from dashboard JIRA: COMPASS-342 Change-Id: I8ddbef46486dbd22f1324bda2d04f7a192b2148e Signed-off-by: carey.xu --- .../adapters/ansible/roles/apache/tasks/main.yml | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 deploy/adapters/ansible/roles/apache/tasks/main.yml (limited to 'deploy/adapters/ansible/roles/apache/tasks') diff --git a/deploy/adapters/ansible/roles/apache/tasks/main.yml b/deploy/adapters/ansible/roles/apache/tasks/main.yml new file mode 100755 index 00000000..11e49c0b --- /dev/null +++ b/deploy/adapters/ansible/roles/apache/tasks/main.yml @@ -0,0 +1,30 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +- include_vars: "{{ ansible_os_family }}.yml" + +- name: install packages + action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest update_cache=yes" + with_items: packages | union(packages_noarch) + +- name: assure listen port exist + template: + dest: '{{ apache_config_dir }}/ports.conf' + src: ports.conf.j2 + notify: + - restart dashboard services + +- name: remove default listen port on centos + lineinfile: + dest: /etc/httpd/conf/httpd.conf + state: absent + regexp: 'Listen 80' + when: ansible_os_family == 'RedHat' + +- meta: flush_handlers -- cgit 1.2.3-korg