diff options
author | carey.xu <carey.xuhan@huawei.com> | 2016-03-14 15:38:33 +0800 |
---|---|---|
committer | carey xu <carey.xuhan@huawei.com> | 2016-03-18 06:41:56 +0000 |
commit | 00826d9f9131b5b3d76d01c13912496ec6067204 (patch) | |
tree | e6b81ec95c2ec555b6f4b5a0bfc4e957cec837b2 /deploy/adapters/ansible/roles/apache/tasks | |
parent | 2490b7463f3a2fc86277f957945b92263495c01c (diff) |
seperate apache2 installtion from dashboard
JIRA: COMPASS-342
Change-Id: I8ddbef46486dbd22f1324bda2d04f7a192b2148e
Signed-off-by: carey.xu <carey.xuhan@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/apache/tasks')
-rwxr-xr-x | deploy/adapters/ansible/roles/apache/tasks/main.yml | 30 |
1 files changed, 30 insertions, 0 deletions
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 |