/
playbook.yml
85 lines (79 loc) · 2.15 KB
/
playbook.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
- hosts: ceph-rs
vars:
locale: en_US.utf8
timezone: Asia/Manila
handlers:
- name: update tzdata
command: /usr/sbin/dpkg-reconfigure --frontend noninteractive tzdata
sudo: yes
tasks:
# Workaround for "stdin is not a tty", see https://github.com/mitchellh/vagrant/issues/1673
- lineinfile: dest=/root/.profile regexp='^mesg n$' line='tty -s && mesg n'
sudo: yes
- name: set locale to {{locale}}
command: /usr/sbin/update-locale LANG={{locale}} LC_ALL={{locale}}
sudo: yes
when: ansible_env.LANG != "{{locale}}"
- name: check /etc/timezone
command: cat /etc/timezone
register: cat_etc_timezone
changed_when: false
- name: set /etc/localtime to $timezone
command: cp /usr/share/zoneinfo/{{timezone}} /etc/localtime
sudo: yes
when: cat_etc_timezone.stdout != "{{timezone}}"
- name: set /etc/timezone to $timezone
lineinfile: dest=/etc/timezone regexp=^UTC$ line='{{timezone}}'
sudo: yes
notify: update tzdata
when: cat_etc_timezone.stdout != "{{timezone}}"
- apt: pkg=linux-image-extra-{{ ansible_kernel }} state=present update_cache=yes cache_valid_time=3600
sudo: yes
- name: Install required packages
apt: pkg={{item}}
with_items:
- build-essential
- autotools-dev
- autoconf
- automake
- cdbs
- gcc
- g++
- git
- libboost-dev
- libedit-dev
- libssl-dev
- libtool
- libfcgi
- libfcgi-dev
- libfuse-dev
- linux-kernel-headers
- libcrypto++-dev
- libexpat1-dev
- pkg-config
- libcurl4-gnutls-dev
- uuid-dev
- libkeyutils-dev
- libgoogle-perftools-dev
- libatomic-ops-dev
- libaio-dev
- libgdata-common
- libgdata13
- libsnappy-dev
- libleveldb-dev
- libblkid-dev
- xfslibs-dev
- libboost-thread-dev
- libboost-program-options-dev
- libudev-dev
- libcrypto++-doc
- libcrypto++-utils
# RADOS
- librados-dev
# For developing Ruby bindings
- ruby-dev
sudo: yes
- ceph_osd_pool: state=present name=data pgnum=32
sudo: yes
- include: rust.yml