Update role
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Adrien Reslinger 2022-10-27 23:38:04 +02:00
parent 48e99ac551
commit d4dac488f9
Signed by: adrien
GPG key ID: DA7B27055C66D6DE
7 changed files with 298 additions and 279 deletions

View file

@ -1,21 +1,21 @@
---
- name: add docker apt key
apt_key:
- name: Add docker apt key
ansible.builtin.apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
when:
- docker_ver == "docker_ce"
- name: add docker repository
apt_repository:
- name: Add docker repository
ansible.builtin.apt_repository:
repo: 'deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable'
state: present
update_cache: yes
update_cache: true
when:
- docker_ver == "docker_ce"
- name: "Ensure GRUB_CMDLINE_LINUX is updated"
lineinfile:
ansible.builtin.lineinfile:
dest: /etc/default/grub
regexp: '^(GRUB_CMDLINE_LINUX=".*)"$'
line: '\1 cgroup_enable=memory swapaccount=1"'
@ -24,12 +24,12 @@
- not docker_installed.stat.exists
- name: "Update grub.conf"
command: update-grub
ansible.builtin.command: update-grub
when:
- not docker_installed.stat.exists
- name: "Ensure DEFAULT_FORWARD_POLICY in /etc/default/ufw is updated"
lineinfile:
ansible.builtin.lineinfile:
dest: /etc/default/ufw
regexp: '^(DEFAULT_FORWARD_POLICY=").*"$'
line: '\1ACCEPT"'
@ -38,11 +38,11 @@
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: "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]
# - name: "Start UFW rules"
# service: name=ufw state=started
# tags: [docker,firewall]