diff --git a/config/automatrop/playbooks/default.yml b/config/automatrop/playbooks/default.yml index 44ce7c9..0114a76 100644 --- a/config/automatrop/playbooks/default.yml +++ b/config/automatrop/playbooks/default.yml @@ -1,6 +1,8 @@ - name: Default hosts: all roles: + - role: facts + tags: facts - role: access tags: access when: root_access @@ -11,8 +13,11 @@ when: root_access - role: dotfiles tags: dotfiles - - role: mnussbaum.base16-builder-ansible # Required for color - tags: color - - role: color - tags: color + - role: mnussbaum.base16-builder-ansible # Required for desktop_environment + tags: + - color + - desktop_environment + - role: desktop_environment + tags: desktop_environment + when: display_server diff --git a/config/automatrop/roles/color/handlers/main.yml b/config/automatrop/roles/desktop_environment/handlers/main.yml similarity index 100% rename from config/automatrop/roles/color/handlers/main.yml rename to config/automatrop/roles/desktop_environment/handlers/main.yml diff --git a/config/automatrop/roles/color/tasks/main.yml b/config/automatrop/roles/desktop_environment/tasks/main.yml similarity index 93% rename from config/automatrop/roles/color/tasks/main.yml rename to config/automatrop/roles/desktop_environment/tasks/main.yml index e6436d1..d397d35 100644 --- a/config/automatrop/roles/color/tasks/main.yml +++ b/config/automatrop/roles/desktop_environment/tasks/main.yml @@ -25,6 +25,8 @@ - tridactyl - dunst register: base16_schemes + tags: + - color - name: Configure Alacritty template: @@ -41,6 +43,8 @@ mode: "u+rw,g=r,o=r" notify: - xrdb-reload + tags: + - color - name: Download base16 theme for qutebrowser copy: @@ -49,6 +53,8 @@ mode: "u+rw,g=r,o=r" notify: - qutebrowser-reload + tags: + - color - name: Download base16 theme for Tridactyl copy: @@ -57,6 +63,8 @@ dest: "{{ ansible_env.HOME }}/.config/tridactyl/themes/theme.css" mode: "u+rw,g=r,o=r" when: False # Not currently used + tags: + - color - name: Configure i3 template: @@ -65,6 +73,8 @@ mode: "u+rw,g=r,o=r" notify: - i3-reload + tags: + - color - name: Set base16 theme for rofi copy: @@ -74,12 +84,16 @@ with_items: - rasi - config + tags: + - color - name: Configure Dunst template: src: "{{ ansible_env.HOME }}/.config/dunst/dunstrc.j2" dest: "{{ ansible_env.HOME }}/.config/dunst/dunstrc" mode: "u+rw,g=r,o=r" + tags: + - color - name: Download base16 theme for fzf copy: @@ -88,13 +102,18 @@ mode: "u+rw,g=r,o=r" notify: - fzf-reload + tags: + - color - name: Download base16 theme for Termux copy: content: "{{ base16_schemes['schemes'][base16_scheme]['termux']['colors']['base16-' + base16_scheme + '.properties'] }}" dest: "{{ ansible_env.HOME }}/.termux/colors.properties" mode: "u+rw,g=r,o=r" -# TODO Only on Termux + tags: + - color + when: termux +# TODO Move to Termux role - name: Download base16 theme for shell copy: @@ -104,6 +123,8 @@ notify: - shell-reload when: False # Not currently used + tags: + - color - name: Set used base16 theme for vim copy: @@ -111,6 +132,8 @@ mode: "u+rw,g=r,o=r" content: "colorscheme base16-{{ base16_scheme }}" when: False # Not currently used + tags: + - color # TODO bar (might change bar in the future, so...) # TODO highlight (there IS a template but the colors look different from vim and mostly the same from when there's no config) diff --git a/config/automatrop/roles/color/vars/main.yml b/config/automatrop/roles/desktop_environment/vars/main.yml similarity index 100% rename from config/automatrop/roles/color/vars/main.yml rename to config/automatrop/roles/desktop_environment/vars/main.yml diff --git a/config/automatrop/roles/facts/tasks/main.yml b/config/automatrop/roles/facts/tasks/main.yml new file mode 100644 index 0000000..4f06a62 --- /dev/null +++ b/config/automatrop/roles/facts/tasks/main.yml @@ -0,0 +1,12 @@ +- name: Set facts + set_fact: + arch_based: "{{ ansible_distribution == 'Archlinux' }}" + arch: "{{ ansible_lsb.id == 'Arch' }}" + manjaro: "{{ ansible_lsb.id == 'Manjaro' or ansible_lsb.id == 'Manjaro-ARM' }}" + termux: "{{ ansible_distribution == 'OtherLinux' and ansible_python.executable == '/data/data/com.termux/files/usr/bin/python' }}" + debian_based: "{{ ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' }}" + debian: "{{ ansible_distribution == 'Debian' }}" + ubuntu: "{{ ansible_distribution == 'Ubuntu' }}" + tags: + - always +# TODO Make this a real Ansible fact maybe? diff --git a/config/automatrop/roles/software/tasks/main.yml b/config/automatrop/roles/software/tasks/main.yml index 77243a9..51564e6 100644 --- a/config/automatrop/roles/software/tasks/main.yml +++ b/config/automatrop/roles/software/tasks/main.yml @@ -1,17 +1,7 @@ -- name: Set variables - set_fact: - arch_based: "{{ ansible_distribution == 'Archlinux' }}" - arch: "{{ ansible_lsb.id == 'Arch' }}" - manjaro: "{{ ansible_lsb.id == 'Manjaro' or ansible_lsb.id == 'Manjaro-ARM' }}" - termux: "{{ ansible_distribution == 'OtherLinux' and ansible_python.executable == '/data/data/com.termux/files/usr/bin/python' }}" - debian_based: "{{ ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' }}" - debian: "{{ ansible_distribution == 'Debian' }}" - ubuntu: "{{ ansible_distribution == 'Ubuntu' }}" - tags: softwarelist # TODO Install python if not done # Or maybe not, it requires a lot of automation for something that can be done -# very quickly manually and is usually uneccessary +# very quickly manually and is usually already installed - name: Install python-apt dependency for Termux block: