forked from mupparajuvamsi/awsprojectdemo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bharatassignment
48 lines (41 loc) · 1.05 KB
/
bharatassignment
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
---
- hosts: ansiblenode1
tasks:
- name: Install packages
yum: pkg={{item}} state=installed
with_items:
- device-mapper-persistent-data
- lvm2
version: '3.1'
services:
mysqlservice:
image: mysql/mysql-server
container_name: mysqltest
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: "test"
MYSQL_USER: "test"
MYSQL_PASSWORD: "test"
MYSQL_ROOT_PASSWORD: "root"
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
tomcatservice:
image: tomcat
container_name: mytomcattest
ports:
- "8080:8080"
depends_on:
- mysqlservice
---
- hosts: ansiblenode1
tasks:
- name: Install packages
yum: pkg={{item}} state=installed
with_items:
- device-mapper-persistent-data
- lvm2
- name: Execute multiple commands
command: "{{item}}"
with_items:
- yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
- yum-config-manager --enable rhui-REGION-rhel-server-extras