First commit
This commit is contained in:
parent
2fdc6b2ca9
commit
5cef7d19b1
13 changed files with 182 additions and 1 deletions
37
tasks/Debian.yml
Normal file
37
tasks/Debian.yml
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
- name: add docker apt key
|
||||
apt_key:
|
||||
url: https://download.docker.com/linux/ubuntu/gpg
|
||||
state: present
|
||||
when:
|
||||
- docker_ver == "docker_ce"
|
||||
|
||||
- name: add docker repository
|
||||
apt_repository: repo='deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ansible_distribution_release}} stable' state=present update_cache=yes
|
||||
when:
|
||||
- docker_ver == "docker_ce"
|
||||
|
||||
- name: "Ensure GRUB_CMDLINE_LINUX is updated"
|
||||
lineinfile: dest=/etc/default/grub regexp='^(GRUB_CMDLINE_LINUX=".*)"$' line='\1 cgroup_enable=memory swapaccount=1"' backrefs=yes
|
||||
when:
|
||||
- not docker_installed.stat.exists
|
||||
|
||||
- name: "Update grub.conf"
|
||||
command: update-grub
|
||||
when:
|
||||
- not docker_installed.stat.exists
|
||||
|
||||
- name: "Ensure DEFAULT_FORWARD_POLICY in /etc/default/ufw is updated"
|
||||
lineinfile: dest=/etc/default/ufw regexp='^(DEFAULT_FORWARD_POLICY=").*"$' line='\1ACCEPT"' backrefs=yes
|
||||
notify: reload ufw
|
||||
tags: [docker,firewall]
|
||||
|
||||
# Need Certificat ? Only in local
|
||||
#- name: "Add docker port 2376/TCP "
|
||||
# ufw: rule=allow port=2376 proto=tcp
|
||||
# notify: reload ufw
|
||||
# tags: [docker,firewall]
|
||||
|
||||
#- name: "Start UFW rules"
|
||||
# service: name=ufw state=started
|
||||
# tags: [docker,firewall]
|
||||
Loading…
Add table
Add a link
Reference in a new issue