common-1.yml 1.62 KB
Newer Older
1
---
2 3 4
  - name: Fix locale problem.
    command: update-locale LANGUAGE="en_US.UTF-8" LC_ALL="en_US.UTF-8"

5 6
  - name: Copy sources list.
    copy: src=sources.list dest=/etc/apt/sources.list owner=root group=root mode=0640
7

8 9 10 11
  - name: Set hostname
    hostname: name={{ inventory_hostname | replace(".vm.okeanos.grnet.gr",".local") }}
    when: "'slaves' in group_names"

12
  - name: Copy hosts file.
13
    template: src=hosts.j2 dest=/etc/hosts backup=no owner=root group=lambda mode=0750
14

15 16
  - name: Upgrade packages.
    apt: upgrade=dist update_cache=yes
17
    environment: proxy_env
18 19 20

  - name: Install the latest Java 7.
    apt: name=openjdk-7-jdk state=latest install_recommends=no update_cache=yes
21
    environment: proxy_env
22 23

  - name: Copy environment file.
24
    template: src=environment.j2 dest=/etc/environment backup=no owner=root group=lambda mode=0750
25 26 27

  - name: Install sudo.
    apt: name=sudo state=latest
28
    environment: proxy_env
29 30 31

  - name: Add hduser to sudo group.
    user: name=hduser group=sudo
32

33 34
  - name: Add flink user to sudo group.
    user: name=flink group=sudo
35

36 37
  - name: Add kafka user to sudo group.
    user: name=kafka group=sudo
38 39 40 41 42 43 44 45 46 47 48 49

  - name: Install supervisord with apt.
    apt: name=supervisor state=latest
    environment: proxy_env

  - name: Configure supervisord for master.
    template: src=supervisord-master.conf.j2 dest=/etc/supervisor/supervisord.conf owner=root group=root mode=0600
    when: "'master' in group_names"

  - name: Configure supervisord for slaves.
    template: src=supervisord-slaves.conf.j2 dest=/etc/supervisor/supervisord.conf owner=root group=root mode=0600
    when: "'slaves' in group_names"