Install specific docker version
This commit is contained in:
@@ -2,3 +2,4 @@
|
|||||||
# Variables listed here are applicable to all host groups
|
# Variables listed here are applicable to all host groups
|
||||||
|
|
||||||
docker_compose_version_to_install: 1.13.0
|
docker_compose_version_to_install: 1.13.0
|
||||||
|
docker_ce_version_to_install: 17.03.0~ce-0~ubuntu-{{ ansible_distribution_release }}
|
||||||
|
|||||||
@@ -1,44 +1,35 @@
|
|||||||
---
|
---
|
||||||
# This playbook contains plays that will run on all nodes
|
# This playbook contains plays that will run on all nodes
|
||||||
|
|
||||||
|
- name: Get docker key
|
||||||
|
shell: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
|
||||||
|
|
||||||
|
- name: Add docker repo
|
||||||
|
apt_repository:
|
||||||
|
repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Update apt
|
- name: Update apt
|
||||||
apt: update_cache=yes
|
apt: update_cache=yes
|
||||||
|
|
||||||
- name: Upgrade APT to the lastest packages
|
- name: Upgrade APT to the lastest packages
|
||||||
apt: upgrade=dist
|
apt: upgrade=dist
|
||||||
|
|
||||||
- name: Install htop
|
- name: Install standard programes
|
||||||
apt: name=htop state=present
|
apt: name={{ item }} state=present
|
||||||
|
with_items:
|
||||||
- name: Install curl
|
- htop
|
||||||
apt: name=curl state=present
|
- curl
|
||||||
|
- openssh-server
|
||||||
- name: Install openssh-server
|
- git
|
||||||
apt: name=openssh-server state=present
|
- rsync
|
||||||
|
- zip
|
||||||
- name: Install git
|
- unzip
|
||||||
apt: name=git state=present
|
- fail2ban
|
||||||
|
- ntp
|
||||||
- name: Install rsync
|
- mysql-client
|
||||||
apt: name=rsync state=present
|
- wget
|
||||||
|
- docker-ce={{docker_ce_version_to_install}}
|
||||||
- name: Install zip
|
|
||||||
apt: name=zip state=present
|
|
||||||
|
|
||||||
- name: Install unzip
|
|
||||||
apt: name=unzip state=present
|
|
||||||
|
|
||||||
- name: Install fail2ban
|
|
||||||
apt: name=fail2ban state=present
|
|
||||||
|
|
||||||
- name: Install ntp
|
|
||||||
apt: name=ntp state=present
|
|
||||||
|
|
||||||
- name: Install mysql-client
|
|
||||||
apt: name=mysql-client state=present
|
|
||||||
|
|
||||||
- name: Install wget
|
|
||||||
apt: name=wget state=present
|
|
||||||
|
|
||||||
- name: Set git username
|
- name: Set git username
|
||||||
shell: git config --global user.name "Jacob Cody Wimer"
|
shell: git config --global user.name "Jacob Cody Wimer"
|
||||||
@@ -46,15 +37,6 @@
|
|||||||
- name: Set git email
|
- name: Set git email
|
||||||
shell: git config --global user.email "jacob.wimer@gmail.com"
|
shell: git config --global user.email "jacob.wimer@gmail.com"
|
||||||
|
|
||||||
- name: Is docker installed
|
|
||||||
shell: which docker
|
|
||||||
register: docker_installed
|
|
||||||
failed_when: "docker_installed.rc == 2 or docker_installed.rc == 3"
|
|
||||||
|
|
||||||
- name: Get docker
|
|
||||||
shell: curl -sSL https://get.docker.com/ | sh
|
|
||||||
when: docker_installed.stdout == ""
|
|
||||||
|
|
||||||
- name: Docker compose version
|
- name: Docker compose version
|
||||||
shell: docker-compose --version
|
shell: docker-compose --version
|
||||||
register: docker_compose_version
|
register: docker_compose_version
|
||||||
|
|||||||
Reference in New Issue
Block a user