Move source dir for desktop source apps
This commit is contained in:
parent
4aec12c4e3
commit
f65dd873d8
@ -14,9 +14,9 @@ fi
|
|||||||
"${SUDO}" apt-add-repository --yes --update ppa:ansible/ansible
|
"${SUDO}" apt-add-repository --yes --update ppa:ansible/ansible
|
||||||
"${SUDO}" apt install -y git ansible
|
"${SUDO}" apt install -y git ansible
|
||||||
|
|
||||||
if [ ! -d "${HOME}/src/ansible-desktop" ]; then
|
if [ ! -d "${HOME}/src/desktop/ansible-desktop" ]; then
|
||||||
mkdir -p "${HOME}/src"
|
mkdir -p "${HOME}/src/desktop/"
|
||||||
cd "${HOME}/src"
|
cd "${HOME}/src/desktop/"
|
||||||
git clone "$ANSIBLE_REPO"
|
git clone "$ANSIBLE_REPO"
|
||||||
fi
|
fi
|
||||||
cd "${HOME}/src/ansible-desktop"
|
cd "${HOME}/src/ansible-desktop"
|
||||||
|
@ -1,20 +1,22 @@
|
|||||||
---
|
---
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
- dwm
|
|
||||||
- ubuntu
|
- ubuntu
|
||||||
- firefox
|
# - dwm
|
||||||
- docker
|
# - firefox
|
||||||
- dotfiles
|
# - docker
|
||||||
- java
|
# - dotfiles
|
||||||
- jetbrains
|
# - java
|
||||||
- signal
|
# - jetbrains
|
||||||
- virtual
|
# - signal
|
||||||
- lutris
|
# - virtual
|
||||||
- ego
|
# - lutris
|
||||||
- laptop
|
# - ego
|
||||||
- prusa-slicer
|
# - laptop
|
||||||
- intellij
|
# - prusa-slicer
|
||||||
- chromium
|
# - intellij
|
||||||
- terraform
|
# - chromium
|
||||||
- no-snap
|
# - terraform
|
||||||
|
# - no-snap
|
||||||
|
vars:
|
||||||
|
desktop_src_dir: {{ ansible_user_dir }}/src/desktop
|
@ -7,15 +7,10 @@
|
|||||||
- git
|
- git
|
||||||
- make
|
- make
|
||||||
|
|
||||||
- name: create src dir
|
|
||||||
file:
|
|
||||||
path: ~/src
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- name: checkout dotfiles
|
- name: checkout dotfiles
|
||||||
git:
|
git:
|
||||||
repo: "{{ dotfiles.repo }}"
|
repo: "{{ dotfiles.repo }}"
|
||||||
dest: "{{ ansible_user_dir }}/src/dotfiles"
|
dest: "{{ desktop_src_dir }}/dotfiles"
|
||||||
clone: yes
|
clone: yes
|
||||||
update: yes
|
update: yes
|
||||||
|
|
||||||
@ -27,4 +22,4 @@
|
|||||||
- name: install
|
- name: install
|
||||||
make:
|
make:
|
||||||
target: install
|
target: install
|
||||||
chdir: "{{ ansible_user_dir }}/src/dotfiles"
|
chdir: "{{ desktop_src_dir }}/dotfiles"
|
||||||
|
@ -15,21 +15,16 @@
|
|||||||
- libx11-xcb-dev
|
- libx11-xcb-dev
|
||||||
- libyajl-dev
|
- libyajl-dev
|
||||||
|
|
||||||
- name: create src dir
|
|
||||||
file:
|
|
||||||
path: ~/src
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- name: checkout dwm
|
- name: checkout dwm
|
||||||
git:
|
git:
|
||||||
repo: "{{ dwm.repo }}"
|
repo: "{{ dwm.repo }}"
|
||||||
dest: "{{ ansible_user_dir }}/src/dwm"
|
dest: "{{ desktop_src_dir }}/dwm"
|
||||||
clone: yes
|
clone: yes
|
||||||
update: yes
|
update: yes
|
||||||
|
|
||||||
- name: build dwm
|
- name: build dwm
|
||||||
make:
|
make:
|
||||||
chdir: "{{ ansible_user_dir }}/src/dwm"
|
chdir: "{{ desktop_src_dir }}/dwm"
|
||||||
|
|
||||||
- name: copy xsession
|
- name: copy xsession
|
||||||
become: yes
|
become: yes
|
||||||
@ -73,7 +68,7 @@
|
|||||||
become: yes
|
become: yes
|
||||||
register: make
|
register: make
|
||||||
make:
|
make:
|
||||||
chdir: "{{ ansible_user_dir }}/src/dwm"
|
chdir: "{{ desktop_src_dir }}/dwm"
|
||||||
target: install
|
target: install
|
||||||
|
|
||||||
- name: debug
|
- name: debug
|
||||||
|
@ -7,27 +7,22 @@
|
|||||||
- git
|
- git
|
||||||
- make
|
- make
|
||||||
|
|
||||||
- name: create src dir
|
|
||||||
file:
|
|
||||||
path: ~/src
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- name: checkout dwmstatus
|
- name: checkout dwmstatus
|
||||||
git:
|
git:
|
||||||
repo: "{{ dwmstatus.repo }}"
|
repo: "{{ dwmstatus.repo }}"
|
||||||
dest: "{{ ansible_user_dir }}/src/dwmstatus"
|
dest: "{{ desktop_src_dir }}/dwmstatus"
|
||||||
clone: yes
|
clone: yes
|
||||||
update: yes
|
update: yes
|
||||||
|
|
||||||
- name: build dwmstatus
|
- name: build dwmstatus
|
||||||
make:
|
make:
|
||||||
chdir: "{{ ansible_user_dir }}/src/dwmstatus"
|
chdir: "{{ desktop_src_dir }}/dwmstatus"
|
||||||
|
|
||||||
- name: install dwmstatus
|
- name: install dwmstatus
|
||||||
become: yes
|
become: yes
|
||||||
register: make
|
register: make
|
||||||
make:
|
make:
|
||||||
chdir: "{{ ansible_user_dir }}/src/dwmstatus"
|
chdir: "{{ desktop_src_dir }}/dwmstatus"
|
||||||
target: install
|
target: install
|
||||||
|
|
||||||
- name: debug
|
- name: debug
|
||||||
|
@ -24,35 +24,35 @@
|
|||||||
|
|
||||||
- name: "polybar: create src dir"
|
- name: "polybar: create src dir"
|
||||||
file:
|
file:
|
||||||
path: "{{ ansible_user_dir }}/src"
|
path: "{{ desktop_src_dir }}"
|
||||||
|
|
||||||
- name: "polybar: checkout"
|
- name: "polybar: checkout"
|
||||||
git:
|
git:
|
||||||
repo: "{{ polybar.repo }}"
|
repo: "{{ polybar.repo }}"
|
||||||
dest: "{{ ansible_user_dir }}/src/polybar"
|
dest: "{{ desktop_src_dir }}/polybar"
|
||||||
clone: yes
|
clone: yes
|
||||||
update: yes
|
update: yes
|
||||||
|
|
||||||
- name: "polybar: create directory for build"
|
- name: "polybar: create directory for build"
|
||||||
file:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
path: "{{ ansible_user_dir }}/src/polybar/build"
|
path: "{{ desktop_src_dir }}/polybar/build"
|
||||||
|
|
||||||
- name: "polybar: run cmake"
|
- name: "polybar: run cmake"
|
||||||
shell:
|
shell:
|
||||||
cmd: "cmake ../"
|
cmd: "cmake ../"
|
||||||
chdir: "{{ ansible_user_dir }}/src/polybar/build"
|
chdir: "{{ desktop_src_dir }}/polybar/build"
|
||||||
|
|
||||||
- name: "polybar: build"
|
- name: "polybar: build"
|
||||||
make:
|
make:
|
||||||
chdir: "{{ ansible_user_dir }}/src/polybar/build"
|
chdir: "{{ desktop_src_dir }}/polybar/build"
|
||||||
params:
|
params:
|
||||||
NUM_THREADS: "{{ ansible_processor_vcpus }}"
|
NUM_THREADS: "{{ ansible_processor_vcpus }}"
|
||||||
|
|
||||||
- name: "polybar: install"
|
- name: "polybar: install"
|
||||||
become: yes
|
become: yes
|
||||||
make:
|
make:
|
||||||
chdir: "{{ ansible_user_dir }}/src/polybar/build"
|
chdir: "{{ desktop_src_dir }}/polybar/build"
|
||||||
target: install
|
target: install
|
||||||
|
|
||||||
- name: "polybar: copy run script"
|
- name: "polybar: copy run script"
|
||||||
|
@ -10,27 +10,22 @@
|
|||||||
- fonts-symbola
|
- fonts-symbola
|
||||||
- libharfbuzz-dev
|
- libharfbuzz-dev
|
||||||
|
|
||||||
- name: create src dir
|
|
||||||
file:
|
|
||||||
path: ~/src
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- name: checkout st
|
- name: checkout st
|
||||||
git:
|
git:
|
||||||
repo: "{{ st.repo }}"
|
repo: "{{ st.repo }}"
|
||||||
dest: "{{ ansible_user_dir }}/src/stterm"
|
dest: "{{ desktop_src_dir }}/stterm"
|
||||||
clone: yes
|
clone: yes
|
||||||
update: yes
|
update: yes
|
||||||
|
|
||||||
- name: build st
|
- name: build st
|
||||||
make:
|
make:
|
||||||
chdir: "{{ ansible_user_dir }}/src/stterm"
|
chdir: "{{ desktop_src_dir }}/stterm"
|
||||||
|
|
||||||
- name: install st
|
- name: install st
|
||||||
become: yes
|
become: yes
|
||||||
register: make
|
register: make
|
||||||
make:
|
make:
|
||||||
chdir: "{{ ansible_user_dir }}/src/stterm"
|
chdir: "{{ desktop_src_dir }}/stterm"
|
||||||
target: install
|
target: install
|
||||||
|
|
||||||
- name: debug
|
- name: debug
|
||||||
|
@ -19,19 +19,19 @@
|
|||||||
- name: checkout ego
|
- name: checkout ego
|
||||||
git:
|
git:
|
||||||
repo: "{{ ego.repo }}"
|
repo: "{{ ego.repo }}"
|
||||||
dest: "{{ ansible_user_dir }}/src/ego"
|
dest: "{{ desktop_src_dir }}/ego"
|
||||||
clone: yes
|
clone: yes
|
||||||
update: yes
|
update: yes
|
||||||
|
|
||||||
- name: build ego
|
- name: build ego
|
||||||
command: cargo install ego
|
command: cargo install ego
|
||||||
args:
|
args:
|
||||||
chdir: "{{ ansible_user_dir }}/src/ego"
|
chdir: "{{ desktop_src_dir }}/ego"
|
||||||
|
|
||||||
- name: copy ego
|
- name: copy ego
|
||||||
become: yes
|
become: yes
|
||||||
copy:
|
copy:
|
||||||
remote_src: true
|
remote_src: true
|
||||||
src: "{{ ansible_user_dir }}/.cargo/bin/ego"
|
src: "{{ desktop_src_dir }}/.cargo/bin/ego"
|
||||||
dest: /usr/local/bin/ego
|
dest: /usr/local/bin/ego
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
@ -17,18 +17,18 @@
|
|||||||
- name: checkout asusctl repo
|
- name: checkout asusctl repo
|
||||||
git:
|
git:
|
||||||
repo: "{{ asusctl.repo }}"
|
repo: "{{ asusctl.repo }}"
|
||||||
dest: "{{ ansible_user_dir }}/src/asusctl"
|
dest: "{{ desktop_src_dir }}/asusctl"
|
||||||
clone: yes
|
clone: yes
|
||||||
update: yes
|
update: yes
|
||||||
|
|
||||||
- name: build asusctl
|
- name: build asusctl
|
||||||
make:
|
make:
|
||||||
chdir: "{{ ansible_user_dir }}/src/asusctl"
|
chdir: "{{ desktop_src_dir }}/asusctl"
|
||||||
|
|
||||||
- name: install asusctl
|
- name: install asusctl
|
||||||
become: yes
|
become: yes
|
||||||
make:
|
make:
|
||||||
chdir: "{{ ansible_user_dir }}/src/asusctl"
|
chdir: "{{ desktop_src_dir }}/asusctl"
|
||||||
target: install
|
target: install
|
||||||
|
|
||||||
- name: "Enable service"
|
- name: "Enable service"
|
||||||
|
@ -11,16 +11,16 @@
|
|||||||
- name: checkout supergfxctl repo
|
- name: checkout supergfxctl repo
|
||||||
git:
|
git:
|
||||||
repo: "{{ supergfxctl.repo }}"
|
repo: "{{ supergfxctl.repo }}"
|
||||||
dest: "{{ ansible_user_dir }}/src/supergfxctl"
|
dest: "{{ desktop_src_dir }}/supergfxctl"
|
||||||
clone: yes
|
clone: yes
|
||||||
update: yes
|
update: yes
|
||||||
|
|
||||||
- name: build supergfxctl
|
- name: build supergfxctl
|
||||||
make:
|
make:
|
||||||
chdir: "{{ ansible_user_dir }}/src/supergfxctl"
|
chdir: "{{ desktop_src_dir }}/supergfxctl"
|
||||||
|
|
||||||
- name: install supergfxctl
|
- name: install supergfxctl
|
||||||
become: yes
|
become: yes
|
||||||
make:
|
make:
|
||||||
chdir: "{{ ansible_user_dir }}/src/supergfxctl"
|
chdir: "{{ desktop_src_dir }}/supergfxctl"
|
||||||
target: install
|
target: install
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
---
|
---
|
||||||
- import_tasks: cleanup.yml
|
- import_tasks: rearrange-folders.yml
|
||||||
|
|
||||||
- import_tasks: timezone.yml
|
#- import_tasks: cleanup.yml
|
||||||
|
#
|
||||||
- import_tasks: packages.yml
|
#- import_tasks: timezone.yml
|
||||||
|
#
|
||||||
- import_tasks: set-type.yml
|
#- import_tasks: packages.yml
|
||||||
|
#
|
||||||
- import_tasks: dconf.yml
|
#- import_tasks: set-type.yml
|
||||||
|
#
|
||||||
|
#- import_tasks: dconf.yml
|
8
roles/ubuntu/tasks/rearrange-folders-loop.yml
Normal file
8
roles/ubuntu/tasks/rearrange-folders-loop.yml
Normal 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
|
17
roles/ubuntu/tasks/rearrange-folders.yml
Normal file
17
roles/ubuntu/tasks/rearrange-folders.yml
Normal 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
|
@ -1,2 +1,5 @@
|
|||||||
---
|
---
|
||||||
timezone: Europe/Warsaw
|
timezone: Europe/Warsaw
|
||||||
|
desktop:
|
||||||
|
apps_source_dir: "{{ ansible_user_dir }}/src/desktop"
|
||||||
|
old_source_dir: "{{ ansible_user_dir }}/src"
|
||||||
|
@ -29,15 +29,10 @@
|
|||||||
- libpulse-dev
|
- libpulse-dev
|
||||||
- libsamplerate0-dev
|
- libsamplerate0-dev
|
||||||
|
|
||||||
|
|
||||||
- name: create src dir
|
|
||||||
file:
|
|
||||||
path: "{{ ansible_user_dir }}/src"
|
|
||||||
|
|
||||||
- name: checkout looking glass
|
- name: checkout looking glass
|
||||||
git:
|
git:
|
||||||
repo: "{{ looking_glass.repo }}"
|
repo: "{{ looking_glass.repo }}"
|
||||||
dest: "{{ ansible_user_dir }}/src/looking-glass"
|
dest: "{{ desktop_src_dir }}/looking-glass"
|
||||||
version: "{{ looking_glass.branch }}"
|
version: "{{ looking_glass.branch }}"
|
||||||
clone: yes
|
clone: yes
|
||||||
update: yes
|
update: yes
|
||||||
@ -45,21 +40,21 @@
|
|||||||
- name: create directory for build
|
- name: create directory for build
|
||||||
file:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
path: "{{ ansible_user_dir }}/src/looking-glass/client/build"
|
path: "{{ desktop_src_dir }}/looking-glass/client/build"
|
||||||
|
|
||||||
- name: run cmake
|
- name: run cmake
|
||||||
shell:
|
shell:
|
||||||
cmd: "cmake ../"
|
cmd: "cmake ../"
|
||||||
chdir: "{{ ansible_user_dir }}/src/looking-glass/client/build"
|
chdir: "{{ desktop_src_dir }}/looking-glass/client/build"
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
make:
|
make:
|
||||||
chdir: "{{ ansible_user_dir }}/src/looking-glass/client/build"
|
chdir: "{{ desktop_src_dir }}/looking-glass/client/build"
|
||||||
|
|
||||||
- name: copy
|
- name: copy
|
||||||
become: yes
|
become: yes
|
||||||
copy:
|
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
|
remote_src: yes
|
||||||
dest: "/usr/local/bin/looking-glass-client"
|
dest: "/usr/local/bin/looking-glass-client"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
Loading…
Reference in New Issue
Block a user