Created
December 12, 2017 04:55
-
-
Save Akkiesoft/985cf0de1025b38bc73afbcf94f13f7c to your computer and use it in GitHub Desktop.
Debian/UbuntuにDockerをインストールするやつ
This file contains 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
- hosts: docker | |
become: yes | |
tasks: | |
- apt: | |
name: | |
- apt-transport-https | |
- ca-certificates | |
- curl | |
- software-properties-common | |
update_cache: yes | |
cache_valid_time: 3600 | |
state: present | |
- apt_key: | |
url: https://download.docker.com/linux/{{ansible_distribution|lower}}/gpg | |
state: present | |
- apt_repository: | |
repo: "deb https://download.docker.com/linux/{{ansible_distribution|lower}} {{ansible_distribution_release}} stable" | |
state: present | |
- apt: | |
name: docker-ce | |
state: present | |
update_cache: yes | |
cache_valid_time: 3600 | |
- group: | |
name: docker | |
state: present | |
- user: | |
append: yes | |
groups: docker | |
name: "{{ ansible_ssh_user }}" | |
changed_when: no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment