1
0
mirror of https://gitlab.com/dbrw/ansible-setup.git synced 2025-08-04 13:05:41 +07:00

add docker task

This commit is contained in:
dbrw 2022-07-11 16:34:50 +07:00
parent 2760e8f99d
commit b941dd9f33
Signed by: dhimas
GPG Key ID: 8D5D880EB08F1544
7 changed files with 35 additions and 5 deletions

View File

@ -3,5 +3,8 @@
# Import environemnt to systemd user session # Import environemnt to systemd user session
systemctl --user import-environment DISPLAY XAUTHORITY PATH XDG_SESSION_ID systemctl --user import-environment DISPLAY XAUTHORITY PATH XDG_SESSION_ID
autorandr -c &
xss-lock -- /usr/local/bin/slock -m 'mantull!!' &
# Run graphical-session.target # Run graphical-session.target
systemctl --user start --wait xorg.target systemctl --user start --wait xorg.target

View 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

View 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

View File

@ -125,12 +125,12 @@
with_items: with_items:
- .config - .config
- .local - .local
- .ssh
- .xinitrc - .xinitrc
- .gtkrc-2.0 - .gtkrc-2.0
- .Xresources - .Xresources
- .Xresources.d - .Xresources.d
- .tmux.conf - .tmux.conf
- .zlogin
- name: Install TPM - name: Install TPM
become_user: "{{ username }}" become_user: "{{ username }}"
@ -146,7 +146,7 @@
ansible.builtin.copy: ansible.builtin.copy:
src: user_home/.ssh src: user_home/.ssh
dest: /home/{{ username }} dest: /home/{{ username }}
force: False force: no
mode: 'preserve' mode: 'preserve'
group: '{{ username }}' group: '{{ username }}'
owner: '{{ username }}' owner: '{{ username }}'
@ -222,5 +222,3 @@
name: xrdb name: xrdb
enabled: true enabled: true
- name: Install xlogin-git
aur: name=xlogin-git user={{ username }} dir={{ aur.dir }}

View File

@ -61,6 +61,9 @@
- include_tasks: virtualization.yml - include_tasks: virtualization.yml
when: install_virtualization == True when: install_virtualization == True
- include_tasks: docker.yml
when: install_docker == True
# Dotfiles # Dotfiles
- include_tasks: dotfiles.yml - include_tasks: dotfiles.yml
when: pull_dotfiles == True when: pull_dotfiles == True

View File

@ -39,5 +39,4 @@
- name: Ensure virtualization network active - name: Ensure virtualization network active
community.libvirt.virt_net: community.libvirt.virt_net:
autostart: yes autostart: yes
state: active
name: jungle name: jungle

View File

@ -58,6 +58,9 @@ install_aerc: True
## Do we want to install virt-manager and qemu kvm? ## Do we want to install virt-manager and qemu kvm?
install_virtualization: True install_virtualization: True
## Do we want to install docker?
install_docker: True
## AUR vars ## AUR vars
## =========================== ## ===========================
use_aur: True use_aur: True