refactor(lint,fqdn-names): Full FQDN names for modules

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
Tuan-Dat Tran
2025-01-22 00:06:35 +01:00
parent 87fb4fa5da
commit 71532a6d25
15 changed files with 107 additions and 85 deletions

View File

@@ -1,36 +1,37 @@
---
- name: Install prerequisites for Docker
apt:
ansible.builtin.apt:
name:
- ca-certificates
- curl
state: present
update_cache: yes
update_cache: true
become: true
- name: Create /etc/apt/keyrings directory
file:
ansible.builtin.file:
path: /etc/apt/keyrings
state: directory
mode: "0755"
- name: Download Docker GPG key
get_url:
ansible.builtin.get_url:
url: https://download.docker.com/linux/ubuntu/gpg
dest: /etc/apt/keyrings/docker.asc
mode: "0644"
- name: Add Docker repository
apt_repository:
ansible.builtin.apt_repository:
repo: "deb [arch={{ ansible_architecture }} signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable"
filename: docker
state: present
- name: Update apt cache after adding Docker repo
apt:
update_cache: yes
ansible.builtin.apt:
update_cache: true
- name: Install Docker packages
apt:
ansible.builtin.apt:
name:
- docker-ce
- docker-ce-cli
@@ -40,7 +41,7 @@
state: present
- name: Add current user to docker group
user:
ansible.builtin.user:
name: "{{ ansible_user_id }}"
groups: docker
append: yes
append: true