diff --git a/dot_bootstrap/setup.yml b/dot_bootstrap/setup.yml index bdd01d9..c4937ed 100644 --- a/dot_bootstrap/setup.yml +++ b/dot_bootstrap/setup.yml @@ -33,7 +33,7 @@ - mosh - nmap - tcpdump - - fdfind + - fd-find ignore_errors: true - name: Install additionall packages... @@ -56,7 +56,7 @@ ignore_errors: true - - name: Install additionall packages... + - name: Install additional packages... ansible.builtin.package: name: - eza @@ -76,25 +76,55 @@ mode: "0755" owner: "{{ regular_user }}" - - name: Installing Nerdfonts - ansible.builtin.unarchive: - #src: https://github.com/eliheuer/caskaydia-cove/archive/refs/heads/master.zip - src: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/CascadiaCode.zip - dest: "~{{ regular_user }}/.fonts/" - remote_src: true - mode: "0755" - owner: "{{ regular_user }}" - - name: Install Oh My Posh ansible.builtin.shell: curl -s https://ohmyposh.dev/install.sh | bash -s args: creates: ~/bin/oh-my-posh # Prevents rerunning if already installed become: false # Set to true if you want to install system-wide (adjust path accordingly) - - name: Git checkout + - name: Git checkout Tmux Plugin Manager ansible.builtin.git: repo: 'https://github.com/tmux-plugins/tpm' - dest: "~{{ regular_user }}/.config/tmux/plugins/" + dest: "~{{ regular_user }}/.config/tmux/plugins/tpm" + clone: yes + update: yes + force: yes + + - name: TPM folder mode + ansible.builtin.file: + path: "~{{ regular_user }}/.config/tmux/plugins/" mode: "0755" owner: "{{ regular_user }}" + recurse: yes + become: yes +# - name: Installing Nerdfonts +# ansible.builtin.unarchive: +# #src: https://github.com/eliheuer/caskaydia-cove/archive/refs/heads/master.zip +# src: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/CascadiaCode.zip +# dest: "~{{ regular_user }}/.fonts/" +# remote_src: true +# mode: "0755" +# owner: "{{ regular_user }}" + + + - name: Ensure fonts directory exists + ansible.builtin.file: + path: "~{{ regular_user }}/.fonts" + state: directory + owner: "{{ regular_user }}" + mode: "0755" + + - name: Check if specific font files exist + ansible.builtin.find: + paths: "~{{ regular_user }}/.fonts" + patterns: "CaskaydiaCoveNerdFont*.ttf" # Adjust for actual font files in the zip + register: existing_fonts + + - name: Download and extract Nerdfonts + ansible.builtin.unarchive: + src: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/CascadiaCode.zip + dest: "~{{ regular_user }}/.fonts" + remote_src: true + owner: "{{ regular_user }}" + when: existing_fonts.matched == 0 # Only run if no matching fonts found diff --git a/dot_bootstrap/setup_fonts.yml b/dot_bootstrap/setup_fonts.yml new file mode 100644 index 0000000..91c0cd0 --- /dev/null +++ b/dot_bootstrap/setup_fonts.yml @@ -0,0 +1,33 @@ +- name: Role out main Configuration to {{ ansible_hostname }} + hosts: localhost + connection: local + gather_facts: true + become: true + + tasks: + - name: Get my user + ansible.builtin.set_fact: + regular_user: "{{ ansible_env.SUDO_USER or ansible_user_id }}" + + + + - name: Ensure fonts directory exists + ansible.builtin.file: + path: "~{{ regular_user }}/.fonts" + state: directory + owner: "{{ regular_user }}" + mode: "0755" + + - name: Check if specific font files exist + ansible.builtin.find: + paths: "~{{ regular_user }}/.fonts" + patterns: "CaskaydiaCoveNerdFont*.ttf" # Adjust for actual font files in the zip + register: existing_fonts + + - name: Download and extract Nerdfonts + ansible.builtin.unarchive: + src: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/CascadiaCode.zip + dest: "~{{ regular_user }}/.fonts" + remote_src: true + owner: "{{ regular_user }}" + when: existing_fonts.matched == 0 # Only run if no matching fonts found diff --git a/dot_bootstrap/setup_small.yml b/dot_bootstrap/setup_small.yml new file mode 100644 index 0000000..ae229a7 --- /dev/null +++ b/dot_bootstrap/setup_small.yml @@ -0,0 +1,26 @@ +- name: Role out main Configuration to {{ ansible_hostname }} + hosts: localhost + connection: local + gather_facts: true + become: true + + tasks: + - name: Get my user + ansible.builtin.set_fact: + regular_user: "{{ ansible_env.SUDO_USER or ansible_user_id }}" + + - name: Git checkout Tmux Plugin Manager + ansible.builtin.git: + repo: 'https://github.com/tmux-plugins/tpm' + dest: "~{{ regular_user }}/.config/tmux/plugins/tpm" + clone: yes + update: yes + force: yes + + - name: TPM folder mode + ansible.builtin.file: + path: "~{{ regular_user }}/.config/tmux/plugins/" + mode: "0755" + owner: "{{ regular_user }}" + recurse: yes + become: yes diff --git a/run_once_install_ansible.sh b/run_once_install_ansible.sh old mode 100644 new mode 100755 index d37b82b..043ee95 --- a/run_once_install_ansible.sh +++ b/run_once_install_ansible.sh @@ -10,11 +10,13 @@ install_on_arch() { } install_linux() { +echo "install linux $1" case $1 in "Arch"|"EndevourOS") install_on_arch ;; - "Ubuntu"|"Debian"|"Linuxmint") + "Ubuntu"|"Debian"|"Linuxmint"|*Mint*) + echo "debian!" install_on_debian ;; esac @@ -29,7 +31,8 @@ case "${OS}" in export PRETTY_NAME="$(lsb_release -i | column --table -N Dist,ID,Name -H Dist,ID -d)" fi - install_linux $PRETTY_NAME + + install_linux "$PRETTY_NAME" ;; esac