Skip to content

Instantly share code, notes, and snippets.

@venkatzgithub
Created March 15, 2021 02:33
Show Gist options
  • Save venkatzgithub/3647cf071d8e50c7ef7ac11d033f697a to your computer and use it in GitHub Desktop.
Save venkatzgithub/3647cf071d8e50c7ef7ac11d033f697a to your computer and use it in GitHub Desktop.
---
- name: Install package
hosts: all
become: true
tasks:
- name: update packages
yum:
name: '*'
state: latest
- name: Execute the script
command: sh /home/ec2-user/docker.sh
become_user: root
always_run: yes
- name: Install docker-compose
get_url:
url: https://github.com/docker/compose/releases/download/1.25.1-rc1/docker-compose-Linux-x86_64
dest: /usr/local/bin/docker-compose
mode: +x
become: yes
- name: Add repository
yum_repository:
name: epel
description: EPEL YUM repo
baseurl: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
- name: install ansible
yum:
name: ansible
state: present
enablerepo: epel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment