Skip to content

Instantly share code, notes, and snippets.

@waday
Created January 13, 2017 14:00
Show Gist options
  • Save waday/ab062b3d817b1bbec39e16b483b95bf4 to your computer and use it in GitHub Desktop.
Save waday/ab062b3d817b1bbec39e16b483b95bf4 to your computer and use it in GitHub Desktop.
Ansibleでdocker-composeをインストール
---
- name: setup-docker-compose
hosts: localhost
become: yes
become_user: root
gather_facts: False
tasks:
- name: install epel-release
yum: name=epel-release state=present
- name: install libselinux-python
yum: name=libselinux-python state=present
- name: disable selinux
selinux: state=disabled
- name: disable and stop firewalld service
service: name=firewalld enabled=no state=stopped
- name: install rpm packages for docker
yum: name={{ item }} state=present
with_items:
- docker-io
- python-pip
- name: enable and start dockerservice
service: name=docker enabled=yes state=started
- name: install and upgrade pip modules
pip: name={{ item }} state=latest
with_items:
- pip
- backports.ssl_match_hostname
- name: install docker-compose
pip: name={{ item }}
with_items:
- docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment