summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/common
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/common')
-rw-r--r--deploy/adapters/ansible/roles/common/tasks/main.yml101
-rw-r--r--deploy/adapters/ansible/roles/common/templates/ntp.conf54
-rw-r--r--deploy/adapters/ansible/roles/common/templates/openstack_ppa_repo.repo.j27
-rw-r--r--deploy/adapters/ansible/roles/common/templates/pip.conf5
-rw-r--r--deploy/adapters/ansible/roles/common/vars/Debian.yml28
-rw-r--r--deploy/adapters/ansible/roles/common/vars/RedHat.yml32
-rw-r--r--deploy/adapters/ansible/roles/common/vars/main.yml14
7 files changed, 0 insertions, 241 deletions
diff --git a/deploy/adapters/ansible/roles/common/tasks/main.yml b/deploy/adapters/ansible/roles/common/tasks/main.yml
deleted file mode 100644
index 69fc1d49..00000000
--- a/deploy/adapters/ansible/roles/common/tasks/main.yml
+++ /dev/null
@@ -1,101 +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: add yum repository for openstack
- template: src=openstack_ppa_repo.repo.j2 dest=/etc/yum.repos.d/openstack_ppa_repo.repo
- when: ansible_os_family == "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
- 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 | match("Error unpack.*crypto-2.6.1-9.*")
-
-- 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: upgrade pip
- pip: name=pip state=latest
-
-- 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/roles/common/templates/ntp.conf b/deploy/adapters/ansible/roles/common/templates/ntp.conf
deleted file mode 100644
index 2d560be2..00000000
--- a/deploy/adapters/ansible/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/roles/common/templates/openstack_ppa_repo.repo.j2 b/deploy/adapters/ansible/roles/common/templates/openstack_ppa_repo.repo.j2
deleted file mode 100644
index bc95ef45..00000000
--- a/deploy/adapters/ansible/roles/common/templates/openstack_ppa_repo.repo.j2
+++ /dev/null
@@ -1,7 +0,0 @@
-[openstack_ppa_repo]
-name=openstack - openstack_repo
-proxy=_none_
-baseurl=http://{{ COMPASS_SERVER.stdout_lines[0] }}/cblr/repo_mirror/centos7-newton-ppa
-enabled=1
-gpgcheck=0
-skip_if_unavailable=1
diff --git a/deploy/adapters/ansible/roles/common/templates/pip.conf b/deploy/adapters/ansible/roles/common/templates/pip.conf
deleted file mode 100644
index 59981258..00000000
--- a/deploy/adapters/ansible/roles/common/templates/pip.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-[global]
-find-links = http://{{ COMPASS_SERVER.stdout_lines[0] }}/pip-openstack
-no-index = true
-[install]
-trusted-host={{ COMPASS_SERVER.stdout_lines[0] }}
diff --git a/deploy/adapters/ansible/roles/common/vars/Debian.yml b/deploy/adapters/ansible/roles/common/vars/Debian.yml
deleted file mode 100644
index ed11bdd6..00000000
--- a/deploy/adapters/ansible/roles/common/vars/Debian.yml
+++ /dev/null
@@ -1,28 +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-switch
- - openvswitch-switch-dpdk
- - python-memcache
- - python-iniparse
- - python-lxml
- - python-crypto
-
-pip_packages:
- - crudini
- - python-keyczar
- - yang2tosca
-
-pip_conf: pip.conf
-
-services:
- - ntp
diff --git a/deploy/adapters/ansible/roles/common/vars/RedHat.yml b/deploy/adapters/ansible/roles/common/vars/RedHat.yml
deleted file mode 100644
index 0697fec7..00000000
--- a/deploy/adapters/ansible/roles/common/vars/RedHat.yml
+++ /dev/null
@@ -1,32 +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
- - wget
- - yum-plugin-priorities
- - vim
- - lsof
- - strace
- - net-tools
-
-pip_packages:
- - crudini
- - python-keyczar
-
-pip_conf: pip.conf
-
-services:
- - openvswitch
- - ntpd
diff --git a/deploy/adapters/ansible/roles/common/vars/main.yml b/deploy/adapters/ansible/roles/common/vars/main.yml
deleted file mode 100644
index 713b6b5f..00000000
--- a/deploy/adapters/ansible/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: []