forked from tapajyotideb/Menu-Python-Ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdependency.yml
30 lines (24 loc) · 1.09 KB
/
dependency.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
- hosts: all
tasks:
- name: Creating epel repository in yum
copy:
dest: "/etc/yum.repos.d/epel_myrepo.repo"
content: |
[epel]
baseurl=https://dl.fedoraproject.org/pub/epel/7/x86_64/
gpgcheck=0
- copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
with_items:
- { src: "/root/Desktop/Software/jdk-8u171-linux-x64.rpm", dest: "/tmp/" }
- { src: "/root/Desktop/Software/hadoop-1.2.1-1.x86_64.rpm", dest: "/tmp/" }
- blockinfile:
path: /root/.bashrc
block: |
export JAVA_HOME=/usr/java/jdk1.8.0_171-amd64/
export PATH=/usr/java/jdk1.8.0_171-amd64/bin/:$PATH
- command: "{{ item }} chdir=/tmp/"
with_items:
- rpm -ivh jdk-8u171-linux-x64.rpm
- rpm -ivh hadoop-1.2.1-1.x86_64.rpm --force