summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/openstack_osp9/roles/common
diff options
context:
space:
mode:
authorliyuenan <liyuenan@huawei.com>2016-12-19 11:06:36 +0800
committerliyuenan <liyuenan@huawei.com>2016-12-20 15:05:03 +0800
commit819912d0379f6cd2b2693c2968576f7514a117c5 (patch)
treee24d274484fa1ec8976c9f1bd44f5ee6e445724b /deploy/adapters/ansible/openstack_osp9/roles/common
parenteb5dbdac42b1b7b775fbc1dc513376425a6898ff (diff)
master only support newton
JIRA: COMPASS-513 Remove other roles and ppa, master only support newton. Change-Id: I47ddb16baa25902c3e05cc7f9d0d6430f5dc7e00 Signed-off-by: liyuenan <liyuenan@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/openstack_osp9/roles/common')
-rwxr-xr-xdeploy/adapters/ansible/openstack_osp9/roles/common/tasks/RedHat.yml3
-rwxr-xr-xdeploy/adapters/ansible/openstack_osp9/roles/common/tasks/main.yml96
-rwxr-xr-xdeploy/adapters/ansible/openstack_osp9/roles/common/templates/hosts7
-rwxr-xr-xdeploy/adapters/ansible/openstack_osp9/roles/common/templates/ntp.conf54
-rw-r--r--deploy/adapters/ansible/openstack_osp9/roles/common/templates/openstack_ppa_repo.repo.j27
-rwxr-xr-xdeploy/adapters/ansible/openstack_osp9/roles/common/templates/pip.conf5
-rwxr-xr-xdeploy/adapters/ansible/openstack_osp9/roles/common/vars/Debian.yml30
-rwxr-xr-xdeploy/adapters/ansible/openstack_osp9/roles/common/vars/RedHat.yml26
-rwxr-xr-xdeploy/adapters/ansible/openstack_osp9/roles/common/vars/main.yml14
9 files changed, 0 insertions, 242 deletions
diff --git a/deploy/adapters/ansible/openstack_osp9/roles/common/tasks/RedHat.yml b/deploy/adapters/ansible/openstack_osp9/roles/common/tasks/RedHat.yml
deleted file mode 100755
index b9f01255..00000000
--- a/deploy/adapters/ansible/openstack_osp9/roles/common/tasks/RedHat.yml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- name: add yum repository for openstack
- template: src=openstack_ppa_repo.repo.j2 dest=/etc/yum.repos.d/openstack_ppa_repo.repo
diff --git a/deploy/adapters/ansible/openstack_osp9/roles/common/tasks/main.yml b/deploy/adapters/ansible/openstack_osp9/roles/common/tasks/main.yml
deleted file mode 100755
index 0f4cf334..00000000
--- a/deploy/adapters/ansible/openstack_osp9/roles/common/tasks/main.yml
+++ /dev/null
@@ -1,96 +0,0 @@
-##############################################################################
-# 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: speed up ansible by purging landscape-common
- apt: pkg=landscape-common state=absent purge=yes
- when: ansible_os_family == "Debian"
-
-- name: update hosts files to all hosts
- template: src=hosts dest=/etc/hosts backup=yes
-
-- name: get compass-core hostname
- local_action: shell hostname
- register: name
-
-- name: get compass-core addr
- shell: awk -F'=' '/compass_server/ {print $2}' /etc/compass.conf
- register: COMPASS_SERVER
-
-- name: run redhat specific play if os is redhat
- include: RedHat.yml
- when: ansible_distribution == "RedHat"
-
-- name: update compass-core name and ip to hosts files
- shell: |
- echo "# compass" >> /etc/hosts
- echo {{ COMPASS_SERVER.stdout_lines[0] }} {{ name.stdout_lines[0] }} >> /etc/hosts
-
-- name: install python-crypto
- yum: name=python-crypto state=present
- register: python_crypto_result
- ignore_errors: yes
- when: ansible_os_family == "RedHat"
-
-- name: remove python crypt egg file to work-around https://bugs.centos.org/view.php?id=9896&nbn=2
- shell: rm -rf /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info
- when: ansible_os_family == "RedHat" and python_crypto_result.msg == "Error unpacking rpm package python2-crypto-2.6.1-9.el7.x86_64\n"
-
-- name: install packages
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest update_cache=yes"
- with_items: packages | union(packages_noarch)
-
-- name: make config template dir exist
- file: path=/opt/os_templates state=directory mode=0755
-
-- name: create pip config directory
- file: path=~/.pip state=directory
-
-- name: update pip.conf
- template: src=pip.conf dest=~/.pip/{{ pip_conf }}
-
-- name: install pip packages
- pip: name={{ item }} state=present extra_args='--pre'
- with_items: pip_packages
-
-- name: install keyczar for accelerate
- pip: name=python-keyczar state=present extra_args='--pre'
- delegate_to: 127.0.0.1
- run_once: true
-
-- name: update ntp conf
- template: src=ntp.conf dest=/etc/ntp.conf backup=yes
-
-- name: use ntpdate once for initial sync time
- shell: ntpdate {{ ntp_server }}
- ignore_errors: True
-
-- name: sync sys clock to hard clock
- shell: hwclock --systohc
- ignore_errors: True
-
-- name: create fireball keys dir
- file: path=~/.fireball.keys state=directory mode=0700
- delegate_to: 127.0.0.1
- run_once: true
-
-- name: restart services
- service: name={{ item }} state=restarted enabled=yes
- with_items: services| union(services_noarch)
-
-- name: write services to monitor list
- lineinfile: dest=/opt/service create=yes line='{{ item }}'
- with_items: services| union(services_noarch)
-
-- name: kill daemon for accelerate
- shell: lsof -ni :5099|grep LISTEN|awk '{print $2}'|xargs kill -9
- ignore_errors: true
-
-- meta: flush_handlers
diff --git a/deploy/adapters/ansible/openstack_osp9/roles/common/templates/hosts b/deploy/adapters/ansible/openstack_osp9/roles/common/templates/hosts
deleted file mode 100755
index 6f76de51..00000000
--- a/deploy/adapters/ansible/openstack_osp9/roles/common/templates/hosts
+++ /dev/null
@@ -1,7 +0,0 @@
-
-# localhost
-127.0.0.1 localhost
-# controller
-172.16.1.1 host1
-# compute
-172.16.1.1 host1
diff --git a/deploy/adapters/ansible/openstack_osp9/roles/common/templates/ntp.conf b/deploy/adapters/ansible/openstack_osp9/roles/common/templates/ntp.conf
deleted file mode 100755
index 2d560be2..00000000
--- a/deploy/adapters/ansible/openstack_osp9/roles/common/templates/ntp.conf
+++ /dev/null
@@ -1,54 +0,0 @@
-# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
-
-driftfile /var/lib/ntp/ntp.drift
-
-
-# Enable this if you want statistics to be logged.
-#statsdir /var/log/ntpstats/
-
-statistics loopstats peerstats clockstats
-filegen loopstats file loopstats type day enable
-filegen peerstats file peerstats type day enable
-filegen clockstats file clockstats type day enable
-
-# Specify one or more NTP servers.
-
-# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
-# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
-# more information.
-server {{ ntp_server }}
-server {{ internal_vip.ip }}
-
-# Use local server as a fallback.
-server 127.127.1.0 # local clock
-fudge 127.127.1.0 stratum 10
-
-# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
-# details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
-# might also be helpful.
-#
-# Note that "restrict" applies to both servers and clients, so a configuration
-# that might be intended to block requests from certain clients could also end
-# up blocking replies from your own upstream servers.
-
-# By default, exchange time with everybody, but don't allow configuration.
-restrict -4 default kod notrap nomodify
-restrict -6 default kod notrap nomodify
-
-# Local users may interrogate the ntp server more closely.
-restrict 127.0.0.1
-restrict ::1
-
-# Clients from this (example!) subnet have unlimited access, but only if
-# cryptographically authenticated.
-#restrict 192.168.123.0 mask 255.255.255.0 notrust
-
-
-# If you want to provide time to your local subnet, change the next line.
-# (Again, the address is an example only.)
-#broadcast 192.168.123.255
-
-# If you want to listen to time broadcasts on your local subnet, de-comment the
-# next lines. Please do this only if you trust everybody on the network!
-#disable auth
-#broadcastclient
diff --git a/deploy/adapters/ansible/openstack_osp9/roles/common/templates/openstack_ppa_repo.repo.j2 b/deploy/adapters/ansible/openstack_osp9/roles/common/templates/openstack_ppa_repo.repo.j2
deleted file mode 100644
index 148f3e14..00000000
--- a/deploy/adapters/ansible/openstack_osp9/roles/common/templates/openstack_ppa_repo.repo.j2
+++ /dev/null
@@ -1,7 +0,0 @@
-[openstack_ppa_repo]
-name=rhel - openstack_repo
-proxy=_none_
-baseurl=http://{{ COMPASS_SERVER.stdout_lines[0] }}/cblr/repo_mirror/redhat7-osp9-ppa
-enabled=1
-gpgcheck=0
-skip_if_unavailable=1
diff --git a/deploy/adapters/ansible/openstack_osp9/roles/common/templates/pip.conf b/deploy/adapters/ansible/openstack_osp9/roles/common/templates/pip.conf
deleted file mode 100755
index 7bb3e43e..00000000
--- a/deploy/adapters/ansible/openstack_osp9/roles/common/templates/pip.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-[global]
-find-links = http://{{ COMPASS_SERVER.stdout_lines[0] }}/pip
-no-index = true
-[install]
-trusted-host={{ COMPASS_SERVER.stdout_lines[0] }}
diff --git a/deploy/adapters/ansible/openstack_osp9/roles/common/vars/Debian.yml b/deploy/adapters/ansible/openstack_osp9/roles/common/vars/Debian.yml
deleted file mode 100755
index 1d7972eb..00000000
--- a/deploy/adapters/ansible/openstack_osp9/roles/common/vars/Debian.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-##############################################################################
-# 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
-##############################################################################
----
-packages:
- - ubuntu-cloud-keyring
- - python-dev
- - openvswitch-datapath-dkms
- - openvswitch-switch
- - python-memcache
- - python-iniparse
- - python-lxml
- #- python-d* #TODO, need remove
-
-pip_packages:
- - crudini
- - python-keyczar
- - yang2tosca
-
-pip_conf: pip.conf
-
-services:
- - ntp
-
-
diff --git a/deploy/adapters/ansible/openstack_osp9/roles/common/vars/RedHat.yml b/deploy/adapters/ansible/openstack_osp9/roles/common/vars/RedHat.yml
deleted file mode 100755
index 8143e1cb..00000000
--- a/deploy/adapters/ansible/openstack_osp9/roles/common/vars/RedHat.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-##############################################################################
-# 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
-##############################################################################
----
-packages:
- - openvswitch
- - python-devel
- - python-memcached
- - gcc
- - redhat-lsb-core
- - python-crypto
-
-pip_packages:
- - crudini
- - python-keyczar
-
-pip_conf: pip.conf
-
-services:
- - openvswitch
- - ntpd
diff --git a/deploy/adapters/ansible/openstack_osp9/roles/common/vars/main.yml b/deploy/adapters/ansible/openstack_osp9/roles/common/vars/main.yml
deleted file mode 100755
index 713b6b5f..00000000
--- a/deploy/adapters/ansible/openstack_osp9/roles/common/vars/main.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-##############################################################################
-# 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
-##############################################################################
----
-packages_noarch:
- - python-pip
- - ntp
-
-services_noarch: []