-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathredis.yml
67 lines (54 loc) · 2.19 KB
/
redis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# This is the redis setup specific to bgpclos topology
# Install and configure redis with sentinel
---
- hosts: localhost
# vars_files:
# - properties.yml
user: cumulus
become: yes
become_method: sudo
tasks:
- name: Install redis server
apt: name=redis-server state=installed
- name: Bind to local address
lineinfile: dest=/etc/redis/redis.conf regexp='bind 127.0.0.1' line='bind 127.0.0.1 {{ anycast_ip_redis }}' backup=yes
- name: Restart redis server
service: name=redis-server state=restarted
- name: Wipe out any redis state
command: redis-cli flushall
- name: Install Cumulus repos for installing netq
apt_repository: repo="{{ item }}" state=present update_cache=yes
with_items:
- deb http://repo3.cumulusnetworks.com/repo CumulusLinux-3-early-access cumulus
- deb http://repo3.cumulusnetworks.com/repo CumulusLinux-3 cumulus upstream
- deb http://repo3.cumulusnetworks.com/repo CumulusLinux-3-updates cumulus upstream
- name: Install netq on OOB server
apt: name="python-netq" state=installed allow_unauthenticated=yes
- name: Configure the agent with the server IP to push
command: netq add server {{ anycast_ip_redis }}
- hosts: '!server*'
# vars_files:
# - properties.yml
user: cumulus
become: yes
become_method: sudo
tasks:
- name: Add EA repos for packages
apt_repository: repo="deb http://repo3.cumulusnetworks.com/repo CumulusLinux-3-early-access cumulus" state=present update_cache=yes
- name: Install agent/ui code
apt: name={{ item }} state=installed
with_items:
- python-network-docopt
- python-netq
- name: copy over new custom netq deb
copy: src=packages/python-netq-vrf.deb dest=/root/netq.deb
- name: Install Quagga
apt: deb=/root/netq.deb
- name: Configure the agent with the server IP to push
command: netq add server {{ anycast_ip_redis }}
- name: Configure the agent to start
command: netq agent restart
- name: Check that the agent is running
command: netq agent status
register: status
failed_when: "'Stopped.' in status.stdout"