mirror of
https://gitlab.com/dbrw/ansible-setup.git
synced 2025-08-04 07:25:40 +07:00
add docker task
This commit is contained in:
parent
2760e8f99d
commit
b941dd9f33
@ -3,5 +3,8 @@
|
||||
# Import environemnt to systemd user session
|
||||
systemctl --user import-environment DISPLAY XAUTHORITY PATH XDG_SESSION_ID
|
||||
|
||||
autorandr -c &
|
||||
xss-lock -- /usr/local/bin/slock -m 'mantull!!' &
|
||||
|
||||
# Run graphical-session.target
|
||||
systemctl --user start --wait xorg.target
|
||||
|
6
roles/common/files/user_home/.zlogin
Normal file
6
roles/common/files/user_home/.zlogin
Normal file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Run X on stratup only on /dev/tty1
|
||||
if [[ "$(tty)" == "/dev/tty1" && ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
|
||||
exec startx
|
||||
fi
|
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
|
||||
|
@ -58,6 +58,9 @@ install_aerc: True
|
||||
## Do we want to install virt-manager and qemu kvm?
|
||||
install_virtualization: True
|
||||
|
||||
## Do we want to install docker?
|
||||
install_docker: True
|
||||
|
||||
## AUR vars
|
||||
## ===========================
|
||||
use_aur: True
|
||||
|
Loading…
Reference in New Issue
Block a user