aboutsummaryrefslogtreecommitdiffstats
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.yml33
-rw-r--r--deploy/adapters/ansible/roles/common/vars/Debian.yml13
-rw-r--r--deploy/adapters/ansible/roles/common/vars/RedHat.yml4
3 files changed, 33 insertions, 17 deletions
diff --git a/deploy/adapters/ansible/roles/common/tasks/main.yml b/deploy/adapters/ansible/roles/common/tasks/main.yml
index 3097d092..b9c52c3e 100644
--- a/deploy/adapters/ansible/roles/common/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/common/tasks/main.yml
@@ -21,11 +21,8 @@
echo "# compass" >> /etc/hosts
echo {{ COMPASS_SERVER.stdout_lines[0] }} {{ name.stdout_lines[0] }} >> /etc/hosts
-- name: first update pkgs
- shell: "{{ ansible_pkg_mgr }} update"
-
- name: install packages
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest"
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest update_cache=yes"
with_items: packages | union(packages_noarch)
- name: make config template dir exist
@@ -41,12 +38,14 @@
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: stop ntp
- service: name={{ ntp_service }} state=stopped enabled=yes
-
- name: use ntpdate once for initial sync time
shell: ntpdate {{ ntp_server }}
ignore_errors: True
@@ -55,9 +54,21 @@
shell: hwclock --systohc
ignore_errors: True
-- name: restart ntp
- service: name={{ ntp_service }} state=restarted enabled=yes
+- name: create fireball keys dir
+ file: path=~/.fireball.keys state=directory mode=0700
+ delegate_to: 127.0.0.1
+ run_once: true
-- name: restart openvswitch
+- name: restart services
service: name={{ item }} state=restarted enabled=yes
- with_items: services
+ 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/vars/Debian.yml b/deploy/adapters/ansible/roles/common/vars/Debian.yml
index 8dce2729..304517a6 100644
--- a/deploy/adapters/ansible/roles/common/vars/Debian.yml
+++ b/deploy/adapters/ansible/roles/common/vars/Debian.yml
@@ -4,12 +4,17 @@ packages:
#- python-dev
- openvswitch-datapath-dkms
- openvswitch-switch
- - crudini
+ - python-memcache
+ - python-iniparse
+ - python-d* #TODO, need remove
-pip_packages: []
+pip_packages:
+ - crudini
+ - python-keyczar
pip_conf: pip.conf
-services: []
+services:
+ - ntp
+
-ntp_service: ntp
diff --git a/deploy/adapters/ansible/roles/common/vars/RedHat.yml b/deploy/adapters/ansible/roles/common/vars/RedHat.yml
index 6618748f..e1f179ad 100644
--- a/deploy/adapters/ansible/roles/common/vars/RedHat.yml
+++ b/deploy/adapters/ansible/roles/common/vars/RedHat.yml
@@ -1,6 +1,7 @@
---
packages:
- openvswitch
+ - python-memcached
pip_packages:
- crudini
@@ -9,5 +10,4 @@ pip_conf: pip.conf
services:
- openvswitch
-
-ntp_service: ntpd
+ - ntpd