Last active
December 2, 2016 02:43
-
-
Save aric49/5c98f68202f1d66b49ff72b382c96fee to your computer and use it in GitHub Desktop.
Deploy Docker on your local PC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - name: Deploy Docker on Local Host | |
| hosts: localhost | |
| become: true | |
| tasks: | |
| - name: Install Apt and HTTP Certs | |
| apt: | |
| name: "{{ item }}" | |
| state: present | |
| with_items: | |
| - "apt-transport-https" | |
| - "ca-certificates" | |
| - name: Install APT Key | |
| apt_key: | |
| keyserver: hkp://p80.pool.sks-keyservers.net:80 | |
| id: 58118E89F3A912897C070ADBF76221572C52609D | |
| - name: Add Apt Repository | |
| apt_repository: | |
| repo: "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | |
| state: present | |
| - name: Install Docker | |
| apt: | |
| name: docker-engine | |
| state: present | |
| update_cache: true | |
| - name: Install Docker Compose | |
| shell: curl -L https://github.com/docker/compose/releases/download/1.8.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose | |
| - name: Set Permissions on Docker Compose | |
| file: | |
| path: /usr/local/bin/docker-compose | |
| mode: 0755 | |
| - name: Start Docker | |
| service: | |
| name: docker | |
| state: started | |
| enabled: false | |
| #This is used to deploy docker by running ansible against your local host. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment