mirror of
https://gitlab.com/dbrw/ansible-setup.git
synced 2026-02-06 04:45:31 +07:00
add docker task
This commit is contained in:
18
roles/common/tasks/docker.yml
Normal file
18
roles/common/tasks/docker.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
- name: Install docker from repo
|
||||
community.general.pacman:
|
||||
name:
|
||||
- docker
|
||||
- docker-compose
|
||||
|
||||
- name: Add user {{ username }} to docker group
|
||||
ansible.builtin.user:
|
||||
groups: docker
|
||||
append: True
|
||||
user: "{{ username }}"
|
||||
|
||||
|
||||
- name: Enable docker service
|
||||
ansible.builtin.systemd:
|
||||
name: docker
|
||||
state: started
|
||||
enabled: yes
|
||||
@@ -125,12 +125,12 @@
|
||||
with_items:
|
||||
- .config
|
||||
- .local
|
||||
- .ssh
|
||||
- .xinitrc
|
||||
- .gtkrc-2.0
|
||||
- .Xresources
|
||||
- .Xresources.d
|
||||
- .tmux.conf
|
||||
- .zlogin
|
||||
|
||||
- name: Install TPM
|
||||
become_user: "{{ username }}"
|
||||
@@ -146,7 +146,7 @@
|
||||
ansible.builtin.copy:
|
||||
src: user_home/.ssh
|
||||
dest: /home/{{ username }}
|
||||
force: False
|
||||
force: no
|
||||
mode: 'preserve'
|
||||
group: '{{ username }}'
|
||||
owner: '{{ username }}'
|
||||
@@ -222,5 +222,3 @@
|
||||
name: xrdb
|
||||
enabled: true
|
||||
|
||||
- name: Install xlogin-git
|
||||
aur: name=xlogin-git user={{ username }} dir={{ aur.dir }}
|
||||
|
||||
@@ -61,6 +61,9 @@
|
||||
- include_tasks: virtualization.yml
|
||||
when: install_virtualization == True
|
||||
|
||||
- include_tasks: docker.yml
|
||||
when: install_docker == True
|
||||
|
||||
# Dotfiles
|
||||
- include_tasks: dotfiles.yml
|
||||
when: pull_dotfiles == True
|
||||
|
||||
@@ -39,5 +39,4 @@
|
||||
- name: Ensure virtualization network active
|
||||
community.libvirt.virt_net:
|
||||
autostart: yes
|
||||
state: active
|
||||
name: jungle
|
||||
|
||||
Reference in New Issue
Block a user