added role docker_host
This commit is contained in:
44
roles/docker_host/tasks/Ubuntu.yml
Normal file
44
roles/docker_host/tasks/Ubuntu.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
- name: Update the apt package index
|
||||
apt: # noqa 403 - we want to update all packages to latest
|
||||
name: "*"
|
||||
state: latest
|
||||
update_cache: yes
|
||||
force_apt_get: yes
|
||||
- name: Install packages for apt add repository over HTTPS
|
||||
apt: # noqa 403 - we want to update all packages to latest
|
||||
name: "{{ packagesdep }}"
|
||||
force_apt_get: yes
|
||||
state: latest
|
||||
update_cache: yes
|
||||
vars:
|
||||
packagesdep:
|
||||
- git
|
||||
- apt-transport-https
|
||||
- ca-certificates
|
||||
- wget
|
||||
- software-properties-common
|
||||
- gnupg2
|
||||
- curl
|
||||
- name: Add Apt signing key from official docker repo
|
||||
apt_key:
|
||||
url: https://download.docker.com/linux/ubuntu/gpg
|
||||
state: present
|
||||
environment:
|
||||
http_proxy: "{{ mmw_proxy }}"
|
||||
https_proxy: "{{ mmw_proxy }}"
|
||||
- name: add docker official repository for Ubuntu
|
||||
apt_repository:
|
||||
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
|
||||
state: present
|
||||
- name: Index new repo into the cache
|
||||
apt: # noqa 403 - we want to update all packages to latest
|
||||
name: "*"
|
||||
state: latest
|
||||
update_cache: yes
|
||||
force_apt_get: yes
|
||||
|
||||
- name: Install python-selinux
|
||||
apt:
|
||||
state: present
|
||||
name: "python3-selinux"
|
||||
...
|
||||
Reference in New Issue
Block a user