diff --git a/bash/bash.yml b/bash/bash.yml index f0460e8..17f78e8 100644 --- a/bash/bash.yml +++ b/bash/bash.yml @@ -2,22 +2,18 @@ - name: Running the Bash ansible playbook... hosts: localhost tasks: - - name: Get repo base path - command: git rev-parse --show-toplevel - register: repo_base_path - - - set_fact: - base_path: '{{repo_base_path.stdout}}/bash/' - - name: Set global git user name command: git config --global user.name "Craig Astill" - name: Set global git user email command: git config --global user.email "craigastill@gmail.com" + - name: Set global git user name + command: git config --global github.user "jackson15j" + - name: Symlink config files to user home directory file: - src: '{{base_path}}{{item}}' + src: '{{playbook_dir}}/{{item}}' dest: '~/{{item}}' state: link force: yes @@ -109,7 +105,7 @@ become: true become_method: sudo copy: - src: '{{base_path}}smb.conf' + src: '{{playbook_dir}}/smb.conf' dest: /etc/samba/ owner: 'root' group: 'root' diff --git a/bash/gnome/gnome.yml b/bash/gnome/gnome.yml index 031f6f9..f593cf0 100644 --- a/bash/gnome/gnome.yml +++ b/bash/gnome/gnome.yml @@ -2,13 +2,6 @@ - name: Running the gnome window manager ansible playbook... hosts: localhost tasks: - - name: Get repo base path - command: git rev-parse --show-toplevel - register: repo_base_path - - - set_fact: - base_path: '{{repo_base_path.stdout}}/bash/' - - name: Apply Gnome touchpad settings # Gnome (Wayland) stamps over my xorg touch pad settings, so lets fix # them up. diff --git a/bash/spectrwm.yml b/bash/spectrwm.yml index bb3d768..310eca4 100644 --- a/bash/spectrwm.yml +++ b/bash/spectrwm.yml @@ -2,16 +2,9 @@ - name: Running the Spectrwm ansible playbook... hosts: localhost tasks: - - name: Get repo base path - command: git rev-parse --show-toplevel - register: repo_base_path - - - set_fact: - base_path: '{{repo_base_path.stdout}}/bash/' - - name: Symlink Spectrwm (tiled window manager) config to user home directory file: - src: '{{base_path}}.spectrwm.conf' + src: '{{playbook_dir}}/.spectrwm.conf' dest: ~/.spectrwm.conf state: link force: yes diff --git a/bash/tmux.yml b/bash/tmux.yml index d187ad0..5d547b5 100644 --- a/bash/tmux.yml +++ b/bash/tmux.yml @@ -2,13 +2,6 @@ - name: Running the Tmux ansible playbook... hosts: localhost tasks: - - name: Get repo base path - command: git rev-parse --show-toplevel - register: repo_base_path - - - set_fact: - base_path: '{{repo_base_path.stdout}}/bash/' - - name: add the user 'tmux' as a guest account. become: true become_method: sudo @@ -23,15 +16,15 @@ become: true become_method: sudo copy: - src: '{{base_path}}.bashrc_tmux' + src: '{{playbook_dir}}/.bashrc_tmux' dest: '/home/tmux/.bashrc' owner: tmux group: tmux force: yes - + - name: Symlink tmux config files to tmux user home directory file: - src: '{{base_path}}{{item}}' + src: '{{playbook_dir}}/{{item}}' dest: '~/{{item}}' state: link force: yes @@ -42,7 +35,7 @@ become: true become_method: sudo copy: - src: '{{base_path}}tmux_share' + src: '{{playbook_dir}}/tmux_share' dest: /usr/local/bin/ owner: '{{ansible_user_id}}' group: '{{ansible_user_gid}}' @@ -52,7 +45,6 @@ become: true become_method: sudo pacman: - name: "{{ item }}" + name: + - tmux state: latest - with_items: - - tmux diff --git a/bash/xfce4.yml b/bash/xfce4.yml index 299744e..41113fd 100644 --- a/bash/xfce4.yml +++ b/bash/xfce4.yml @@ -2,16 +2,9 @@ - name: Running the xfce4 window manager ansible playbook... hosts: localhost tasks: - - name: Get repo base path - command: git rev-parse --show-toplevel - register: repo_base_path - - - set_fact: - base_path: '{{repo_base_path.stdout}}/bash/' - - name: Symlink xfce4 config directories to ~/.config/ file: - src: '{{base_path}}{{item}}' + src: '{{playbook_dir}}/{{item}}' dest: '~/.config/{{item}}' state: link force: yes @@ -53,7 +46,7 @@ # to quickly generate the xrandr line to fix this up with a script. # TODO: display detection to get our scripts called on hotplug. file: - src: '{{base_path}}.screenlayout' + src: '{{playbook_dir}}/.screenlayout' dest: ~/.screenlayout state: link force: yes diff --git a/dell/dell.yml b/dell/dell.yml index 1a0ba83..62e7cc3 100644 --- a/dell/dell.yml +++ b/dell/dell.yml @@ -3,13 +3,6 @@ - name: Running the Dell XPS 13 ansible playbook... hosts: localhost tasks: - - name: Get repo base path - command: git rev-parse --show-toplevel - register: repo_base_path - - - set_fact: - base_path: '{{repo_base_path.stdout}}/dell/' - - name: Install Dell packages become: true become_method: sudo @@ -44,7 +37,7 @@ become: true become_method: sudo copy: - src: '{{base_path}}{{item}}' + src: '{{playbook_dir}}/{{item}}' dest: /etc/systemd/ owner: 'root' group: 'root' @@ -66,7 +59,7 @@ become: true become_method: sudo copy: - src: '{{base_path}}30-touchpad.conf' + src: '{{playbook_dir}}/30-touchpad.conf' dest: /etc/X11/xorg.conf.d/ owner: 'root' group: 'root' @@ -78,7 +71,7 @@ become: true become_method: sudo copy: - src: '{{base_path}}blacklist.conf' + src: '{{playbook_dir}}/blacklist.conf' dest: /etc/modprobe.d/ owner: 'root' group: 'root' @@ -89,7 +82,7 @@ become: true become_method: sudo copy: - src: '{{base_path}}90-override.conf' + src: '{{playbook_dir}}/90-override.conf' dest: /etc/sysctl.d/ owner: 'root' group: 'root' diff --git a/dev_env/c_sharp.yml b/dev_env/c_sharp.yml index fd7261d..eb886e4 100644 --- a/dev_env/c_sharp.yml +++ b/dev_env/c_sharp.yml @@ -1,13 +1,6 @@ - name: Running the C# Dev Environment ansible playbook... hosts: localhost tasks: - - name: Get repo base path - command: git rev-parse --show-toplevel - register: repo_base_path - - - set_fact: - base_path: '{{repo_base_path.stdout}}/' - - name: Install C# packages become: true become_method: sudo diff --git a/dev_env/cpp.yml b/dev_env/cpp.yml index cd04e43..945e60e 100644 --- a/dev_env/cpp.yml +++ b/dev_env/cpp.yml @@ -1,13 +1,6 @@ - name: Running the C++ Dev Environment ansible playbook... hosts: localhost tasks: - - name: Get repo base path - command: git rev-parse --show-toplevel - register: repo_base_path - - - set_fact: - base_path: '{{repo_base_path.stdout}}/' - - name: Install C++ packages become: true become_method: sudo diff --git a/dev_env/dev_environment.yml b/dev_env/dev_environment.yml index f7210c7..bf0038f 100644 --- a/dev_env/dev_environment.yml +++ b/dev_env/dev_environment.yml @@ -2,13 +2,6 @@ - name: Running the Dev Environment ansible playbook... hosts: localhost tasks: - - name: Get repo base path - command: git rev-parse --show-toplevel - register: repo_base_path - - - set_fact: - base_path: '{{repo_base_path.stdout}}/' - - name: Install remote working packages become: true become_method: sudo diff --git a/dev_env/java.yml b/dev_env/java.yml index bf88293..39428d3 100644 --- a/dev_env/java.yml +++ b/dev_env/java.yml @@ -1,13 +1,6 @@ - name: Running the Java Dev Environment ansible playbook... hosts: localhost tasks: - - name: Get repo base path - command: git rev-parse --show-toplevel - register: repo_base_path - - - set_fact: - base_path: '{{repo_base_path.stdout}}/' - - name: Install Java packages. become: true become_method: sudo diff --git a/dev_env/productivity.yml b/dev_env/productivity.yml index b2ef4a3..506dfe1 100644 --- a/dev_env/productivity.yml +++ b/dev_env/productivity.yml @@ -1,13 +1,6 @@ - name: Running the Productivity Dev Environment ansible playbook... hosts: localhost tasks: - - name: Get repo base path - command: git rev-parse --show-toplevel - register: repo_base_path - - - set_fact: - base_path: '{{repo_base_path.stdout}}/' - - name: Install general productivity packages become: true become_method: sudo diff --git a/dev_env/python.yml b/dev_env/python.yml index a087b09..d903cb0 100644 --- a/dev_env/python.yml +++ b/dev_env/python.yml @@ -1,13 +1,6 @@ - name: Running the Python Dev Environment ansible playbook... hosts: localhost tasks: - - name: Get repo base path - command: git rev-parse --show-toplevel - register: repo_base_path - - - set_fact: - base_path: '{{repo_base_path.stdout}}/' - - name: Install system-wide python packages become: true become_method: sudo diff --git a/dev_env/random.yml b/dev_env/random.yml index e5c4e1d..dff7b89 100644 --- a/dev_env/random.yml +++ b/dev_env/random.yml @@ -1,13 +1,6 @@ - name: Running the Random Dev Environment ansible playbook... hosts: localhost tasks: - - name: Get repo base path - command: git rev-parse --show-toplevel - register: repo_base_path - - - set_fact: - base_path: '{{repo_base_path.stdout}}/' - - name: Install random stuff I am toying with, but are not core packages become: true become_method: sudo diff --git a/music/music.yml b/music/music.yml index d0b0619..7730854 100644 --- a/music/music.yml +++ b/music/music.yml @@ -2,21 +2,10 @@ - name: Running the Music ansible playbook... hosts: localhost tasks: - - name: Get repo base path - command: git rev-parse --show-toplevel - register: repo_base_path - tags: - - music - - - set_fact: - base_path: '{{repo_base_path.stdout}}/music/' - tags: - - music - # Tasks to install Music packages for the configs like mpd/abcde. - name: Symlink music configs to user home directory file: - src: '{{base_path}}{{ item }}' + src: '{{playbook_dir}}/{{ item }}' dest: '~/{{ item }}' state: link force: yes # See: https://github.com/ansible/ansible/issues/7627 @@ -37,7 +26,7 @@ - name: Symlink .mpd directory to ~/Music/.mpd/ file: - src: '{{base_path}}.mpd' + src: '{{playbook_dir}}/.mpd' dest: ~/Music/.mpd state: link force: yes diff --git a/photos/photos.yml b/photos/photos.yml index 9d13b65..f4a9f4b 100644 --- a/photos/photos.yml +++ b/photos/photos.yml @@ -2,13 +2,6 @@ - name: Running the Photo ansible playbook... hosts: localhost tasks: - - name: Get repo base path - command: git rev-parse --show-toplevel - register: repo_base_path - - - set_fact: - base_path: '{{repo_base_path.stdout}}/photos/' - - name: Install photo packages become: true become_method: sudo diff --git a/video/video.yml b/video/video.yml index 44cc033..15d410c 100644 --- a/video/video.yml +++ b/video/video.yml @@ -2,17 +2,6 @@ - name: Running the Video ansible playbook... hosts: localhost tasks: - - name: Get repo base path - command: git rev-parse --show-toplevel - register: repo_base_path - tags: - - video - - - set_fact: - base_path: '{{repo_base_path.stdout}}/video/' - tags: - - video - - name: Install Video packages become: true become_method: sudo diff --git a/web/web.yml b/web/web.yml index 1c53997..0678c17 100644 --- a/web/web.yml +++ b/web/web.yml @@ -2,13 +2,6 @@ - name: Running the Web ansible playbook... hosts: localhost tasks: - - name: Get repo base path - command: git rev-parse --show-toplevel - register: repo_base_path - - - set_fact: - base_path: '{{repo_base_path.stdout}}/web/' - # - name: Get PGP key for discord's libc dependency # # https://aur.archlinux.org/packages/libc%2B%2B/ # command: gpg --recv-keys 0FC3042E345AD05D