Commit 5b36d254 authored by efikalti's avatar efikalti
Browse files

removed ansible from branch lambda example

parent 7b5bd538
#
# config file for ansible
# https://raw.githubusercontent.com/ansible/ansible/devel/examples/ansible.cfg
#
[defaults]
remote_user = root
hostfile = hosts
\ No newline at end of file
export JAVA_HOME=/usr/
export HADOOP_HOME=/usr/local/hadoop
export YARN_HOME=$HADOOP_HOME
export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
export YARN_CONF_DIR=$HADOOP_HOME/etc/hadoop
PATH=$PATH:$HADOOP_HOME/bin
PATH=$PATH:$HADOOP_HOME/sbin
export FLINK_HOME=/usr/local/flink
PATH=$PATH:$FLINK_HOME/bin
export KAFKA_HOME=/usr/local/kafka
\ No newline at end of file
127.0.0.1 localhost
192.168.0.3 snf-661306
192.168.0.2 snf-661303
192.168.0.4 snf-661304
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
---
- hosts: vms
user: root
tasks:
# aptitude packages
- include: ../tasks/aptitude/upgrade.yml tags=install_scripts
- include: ../tasks/aptitude/java.yml tags=install_scripts
- include: ../tasks/aptitude/vim.yml tags=install_scripts
- include: ../tasks/aptitude/python.yml tags=install_scripts
# copy /etc/hosts file
- include: ../tasks/install/hosts.yml tags=install_scripts
# copy /etc/environment file
- include ../tasks/include/environment.yml tags=install_scripts
# run ssh-keygen
- include: ../tasks/ssh/ssh-keygen.yml tags=install_scripts
- hosts: master
user: root
tasks:
# copy ssh public key of master
- include: ../tasks/ssh/fetch-key.yml
- hosts: vms
user: root
tasks:
# distribute ssh key to all nodes
- include: ../tasks/ssh/authorized-key.yml
\ No newline at end of file
---
# Install latest version of "openjdk-7-jdk" ignoring "install-recommends"
- name: install latest Java 7
tags: install_scripts
apt: name=openjdk-7-jdk state=latest install_recommends=no update_cache=yes
\ No newline at end of file
---
# Install python
- name: install python
tags: install_scripts
apt: name=python state=latest install_recommends=no update_cache=yes
\ No newline at end of file
---
# Update all packages to the latest version
- name: Upgrade packages
tags: install_scripts
apt: upgrade=dist update_cache=yes
\ No newline at end of file
---
# Install vim
- name: install vim
tags: install_scripts
apt: name=vim state=latest install_recommends=no update_cache=yes
\ No newline at end of file
---
#copy hosts ip-hostname file
- name: Copy hosts file
tags: install_scripts
copy: src=files/etc/environment
dest=/etc/ backup=no
owner=root group=root mode=0750
\ No newline at end of file
---
#copy hosts ip-hostname file
- name: Copy hosts file
tags: install_scripts
copy: src=../files/etc/hosts
dest=/etc/ backup=no
owner=root group=root mode=0750
\ No newline at end of file
---
- name: ssh key
authorized_key: user=root key="{{ lookup('file', '/tmp/fetched/id_rsa.pub') }}"
\ No newline at end of file
---
- name: fetch id_rsa.pub file from master
fetch: src=/root/.ssh/id_rsa.pub dest=/tmp/fetched/ flat=yes
---
- name: Run ssh-keygen
tags: install_scripts
shell: cat /dev/zero | ssh-keygen -q -N ""
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment