Move source dir for desktop source apps

This commit is contained in:
Przemek Grondek 2023-08-08 23:09:36 +02:00
parent 4aec12c4e3
commit f65dd873d8
15 changed files with 90 additions and 83 deletions

View File

@ -14,9 +14,9 @@ fi
"${SUDO}" apt-add-repository --yes --update ppa:ansible/ansible
"${SUDO}" apt install -y git ansible
if [ ! -d "${HOME}/src/ansible-desktop" ]; then
mkdir -p "${HOME}/src"
cd "${HOME}/src"
if [ ! -d "${HOME}/src/desktop/ansible-desktop" ]; then
mkdir -p "${HOME}/src/desktop/"
cd "${HOME}/src/desktop/"
git clone "$ANSIBLE_REPO"
fi
cd "${HOME}/src/ansible-desktop"

View File

@ -1,20 +1,22 @@
---
- hosts: localhost
roles:
- dwm
- ubuntu
- firefox
- docker
- dotfiles
- java
- jetbrains
- signal
- virtual
- lutris
- ego
- laptop
- prusa-slicer
- intellij
- chromium
- terraform
- no-snap
# - dwm
# - firefox
# - docker
# - dotfiles
# - java
# - jetbrains
# - signal
# - virtual
# - lutris
# - ego
# - laptop
# - prusa-slicer
# - intellij
# - chromium
# - terraform
# - no-snap
vars:
desktop_src_dir: {{ ansible_user_dir }}/src/desktop

View File

@ -7,15 +7,10 @@
- git
- make
- name: create src dir
file:
path: ~/src
state: directory
- name: checkout dotfiles
git:
repo: "{{ dotfiles.repo }}"
dest: "{{ ansible_user_dir }}/src/dotfiles"
dest: "{{ desktop_src_dir }}/dotfiles"
clone: yes
update: yes
@ -27,4 +22,4 @@
- name: install
make:
target: install
chdir: "{{ ansible_user_dir }}/src/dotfiles"
chdir: "{{ desktop_src_dir }}/dotfiles"

View File

@ -15,21 +15,16 @@
- libx11-xcb-dev
- libyajl-dev
- name: create src dir
file:
path: ~/src
state: directory
- name: checkout dwm
git:
repo: "{{ dwm.repo }}"
dest: "{{ ansible_user_dir }}/src/dwm"
dest: "{{ desktop_src_dir }}/dwm"
clone: yes
update: yes
- name: build dwm
make:
chdir: "{{ ansible_user_dir }}/src/dwm"
chdir: "{{ desktop_src_dir }}/dwm"
- name: copy xsession
become: yes
@ -73,7 +68,7 @@
become: yes
register: make
make:
chdir: "{{ ansible_user_dir }}/src/dwm"
chdir: "{{ desktop_src_dir }}/dwm"
target: install
- name: debug

View File

@ -7,27 +7,22 @@
- git
- make
- name: create src dir
file:
path: ~/src
state: directory
- name: checkout dwmstatus
git:
repo: "{{ dwmstatus.repo }}"
dest: "{{ ansible_user_dir }}/src/dwmstatus"
dest: "{{ desktop_src_dir }}/dwmstatus"
clone: yes
update: yes
- name: build dwmstatus
make:
chdir: "{{ ansible_user_dir }}/src/dwmstatus"
chdir: "{{ desktop_src_dir }}/dwmstatus"
- name: install dwmstatus
become: yes
register: make
make:
chdir: "{{ ansible_user_dir }}/src/dwmstatus"
chdir: "{{ desktop_src_dir }}/dwmstatus"
target: install
- name: debug

View File

@ -24,35 +24,35 @@
- name: "polybar: create src dir"
file:
path: "{{ ansible_user_dir }}/src"
path: "{{ desktop_src_dir }}"
- name: "polybar: checkout"
git:
repo: "{{ polybar.repo }}"
dest: "{{ ansible_user_dir }}/src/polybar"
dest: "{{ desktop_src_dir }}/polybar"
clone: yes
update: yes
- name: "polybar: create directory for build"
file:
state: directory
path: "{{ ansible_user_dir }}/src/polybar/build"
path: "{{ desktop_src_dir }}/polybar/build"
- name: "polybar: run cmake"
shell:
cmd: "cmake ../"
chdir: "{{ ansible_user_dir }}/src/polybar/build"
chdir: "{{ desktop_src_dir }}/polybar/build"
- name: "polybar: build"
make:
chdir: "{{ ansible_user_dir }}/src/polybar/build"
chdir: "{{ desktop_src_dir }}/polybar/build"
params:
NUM_THREADS: "{{ ansible_processor_vcpus }}"
- name: "polybar: install"
become: yes
make:
chdir: "{{ ansible_user_dir }}/src/polybar/build"
chdir: "{{ desktop_src_dir }}/polybar/build"
target: install
- name: "polybar: copy run script"

View File

@ -10,27 +10,22 @@
- fonts-symbola
- libharfbuzz-dev
- name: create src dir
file:
path: ~/src
state: directory
- name: checkout st
git:
repo: "{{ st.repo }}"
dest: "{{ ansible_user_dir }}/src/stterm"
dest: "{{ desktop_src_dir }}/stterm"
clone: yes
update: yes
- name: build st
make:
chdir: "{{ ansible_user_dir }}/src/stterm"
chdir: "{{ desktop_src_dir }}/stterm"
- name: install st
become: yes
register: make
make:
chdir: "{{ ansible_user_dir }}/src/stterm"
chdir: "{{ desktop_src_dir }}/stterm"
target: install
- name: debug

View File

@ -19,19 +19,19 @@
- name: checkout ego
git:
repo: "{{ ego.repo }}"
dest: "{{ ansible_user_dir }}/src/ego"
dest: "{{ desktop_src_dir }}/ego"
clone: yes
update: yes
- name: build ego
command: cargo install ego
args:
chdir: "{{ ansible_user_dir }}/src/ego"
chdir: "{{ desktop_src_dir }}/ego"
- name: copy ego
become: yes
copy:
remote_src: true
src: "{{ ansible_user_dir }}/.cargo/bin/ego"
src: "{{ desktop_src_dir }}/.cargo/bin/ego"
dest: /usr/local/bin/ego
mode: '0755'

View File

@ -17,18 +17,18 @@
- name: checkout asusctl repo
git:
repo: "{{ asusctl.repo }}"
dest: "{{ ansible_user_dir }}/src/asusctl"
dest: "{{ desktop_src_dir }}/asusctl"
clone: yes
update: yes
- name: build asusctl
make:
chdir: "{{ ansible_user_dir }}/src/asusctl"
chdir: "{{ desktop_src_dir }}/asusctl"
- name: install asusctl
become: yes
make:
chdir: "{{ ansible_user_dir }}/src/asusctl"
chdir: "{{ desktop_src_dir }}/asusctl"
target: install
- name: "Enable service"

View File

@ -11,16 +11,16 @@
- name: checkout supergfxctl repo
git:
repo: "{{ supergfxctl.repo }}"
dest: "{{ ansible_user_dir }}/src/supergfxctl"
dest: "{{ desktop_src_dir }}/supergfxctl"
clone: yes
update: yes
- name: build supergfxctl
make:
chdir: "{{ ansible_user_dir }}/src/supergfxctl"
chdir: "{{ desktop_src_dir }}/supergfxctl"
- name: install supergfxctl
become: yes
make:
chdir: "{{ ansible_user_dir }}/src/supergfxctl"
chdir: "{{ desktop_src_dir }}/supergfxctl"
target: install

View File

@ -1,10 +1,12 @@
---
- import_tasks: cleanup.yml
- import_tasks: rearrange-folders.yml
- import_tasks: timezone.yml
- import_tasks: packages.yml
- import_tasks: set-type.yml
- import_tasks: dconf.yml
#- import_tasks: cleanup.yml
#
#- import_tasks: timezone.yml
#
#- import_tasks: packages.yml
#
#- import_tasks: set-type.yml
#
#- import_tasks: dconf.yml

View File

@ -0,0 +1,8 @@
- name: "Lookup for {{ item }} directory"
stat:
path: "{{ desktop.old_source_dir }}/{{ item }}"
register: old_directory
- name: "Move {{ desktop.old_source_dir }}/{{ item }} to {{ desktop.apps_source_dir }}/{{ item }}"
command: mv {{ desktop.old_source_dir }}/{{ item }} {{ desktop.apps_source_dir }}/{{ item }}
when:
- old_directory.stat.exists

View File

@ -0,0 +1,17 @@
- name: create directory
file:
state: directory
path: "{{ desktop.apps_source_dir }}"
- include_tasks: rearrange-folders-loop.yml
loop:
- asusctl
- dotfiles
- dwm
- dwm-nest
- ego
- dwmstatus
- polybar
- streamdeck
- stterm
- supergfxctl

View File

@ -1,2 +1,5 @@
---
timezone: Europe/Warsaw
desktop:
apps_source_dir: "{{ ansible_user_dir }}/src/desktop"
old_source_dir: "{{ ansible_user_dir }}/src"

View File

@ -29,15 +29,10 @@
- libpulse-dev
- libsamplerate0-dev
- name: create src dir
file:
path: "{{ ansible_user_dir }}/src"
- name: checkout looking glass
git:
repo: "{{ looking_glass.repo }}"
dest: "{{ ansible_user_dir }}/src/looking-glass"
dest: "{{ desktop_src_dir }}/looking-glass"
version: "{{ looking_glass.branch }}"
clone: yes
update: yes
@ -45,21 +40,21 @@
- name: create directory for build
file:
state: directory
path: "{{ ansible_user_dir }}/src/looking-glass/client/build"
path: "{{ desktop_src_dir }}/looking-glass/client/build"
- name: run cmake
shell:
cmd: "cmake ../"
chdir: "{{ ansible_user_dir }}/src/looking-glass/client/build"
chdir: "{{ desktop_src_dir }}/looking-glass/client/build"
- name: build
make:
chdir: "{{ ansible_user_dir }}/src/looking-glass/client/build"
chdir: "{{ desktop_src_dir }}/looking-glass/client/build"
- name: copy
become: yes
copy:
src: "{{ ansible_user_dir }}/src/looking-glass/client/build/looking-glass-client"
src: "{{ desktop_src_dir }}/looking-glass/client/build/looking-glass-client"
remote_src: yes
dest: "/usr/local/bin/looking-glass-client"
mode: "0755"