This commit is contained in:
parent
8fbd68eb71
commit
5ce0140b54
4 changed files with 47 additions and 16 deletions
|
|
@ -7,12 +7,19 @@
|
|||
- 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
|
||||
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
|
||||
lineinfile:
|
||||
dest: /etc/default/grub
|
||||
regexp: '^(GRUB_CMDLINE_LINUX=".*)"$'
|
||||
line: '\1 cgroup_enable=memory swapaccount=1"'
|
||||
backrefs: yes
|
||||
when:
|
||||
- not docker_installed.stat.exists
|
||||
|
||||
|
|
@ -22,7 +29,11 @@
|
|||
- 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
|
||||
lineinfile:
|
||||
dest: /etc/default/ufw
|
||||
regexp: '^(DEFAULT_FORWARD_POLICY=").*"$'
|
||||
line: '\1ACCEPT"'
|
||||
backrefs: yes
|
||||
notify: reload ufw
|
||||
tags: [docker,firewall]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue