Compare commits

...

4 Commits

4 changed files with 16 additions and 19 deletions

View File

@@ -65,16 +65,21 @@ if [[ "$RUN_HA" == true ]]; then
fi fi
if [[ "$RUN_ANSIBLE" == true ]]; then if [[ "$RUN_ANSIBLE" == true ]]; then
if command -v ansible-playbook &> /dev/null; then if ! command -v ansible-playbook &> /dev/null; then
printfe "%s\n" "cyan" "Upgrading Ansible packages..." printfe "%s\n" "yellow" "Ansible is not installed, installing it with pipx..."
cd $HOME/dotfiles/config/ansible && ansible-playbook -i $HOME/dotfiles/config/ansible/inventory.ini $HOME/dotfiles/config/ansible/main.yml --extra-vars "hostname=$DOTF_HOSTNAME" --limit $DOTF_HOSTNAME --ask-become-pass pipx install --include-deps ansible ansible-lint
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
printfe "%s\n" "red" "Failed to upgrade Ansible packages." printfe "%s\n" "red" "Failed to install Ansible."
exit 1 exit 1
fi fi
else fi
printfe "%s\n" "red" "Ansible is not installed."
printfe "%s\n" "cyan" "Upgrading Ansible packages..."
cd $HOME/dotfiles/config/ansible && ansible-playbook -i $HOME/dotfiles/config/ansible/inventory.ini $HOME/dotfiles/config/ansible/main.yml --extra-vars "hostname=$DOTF_HOSTNAME" --extra-vars "ansible_user=$USER" --limit $DOTF_HOSTNAME --ask-become-pass
if [[ $? -ne 0 ]]; then
printfe "%s\n" "red" "Failed to upgrade Ansible packages."
exit 1 exit 1
fi fi
fi fi

View File

@@ -50,6 +50,7 @@
- io.github.nokse22.Exhibit - io.github.nokse22.Exhibit
- net.nokyan.Resources - net.nokyan.Resources
- dev.zed.Zed - dev.zed.Zed
- com.discordapp.Discord
- name: Install desired Flatpak applications - name: Install desired Flatpak applications
community.general.flatpak: community.general.flatpak:

View File

@@ -30,7 +30,8 @@
state: absent state: absent
when: pano_check.stat.exists == False when: pano_check.stat.exists == False
- name: Enable Pano - Clipboard Manager - name: Notify user of required GNOME Shell extension reload
ansible.builtin.command: gnome-extensions enable pano@elhan.io ansible.builtin.debug:
msg: "Please reload GNOME Shell by pressing Alt + F2, typing 'r' and pressing Enter. Then enable the Pano - Clipboard Manager extension in GNOME Tweaks. Or on Wayland, log out and back in."
when: pano_check.stat.exists == False when: pano_check.stat.exists == False

View File

@@ -32,16 +32,6 @@
homeserver-pc: "~/dotfiles/config/git/gitconfig.linux" homeserver-pc: "~/dotfiles/config/git/gitconfig.linux"
wsl: "~/dotfiles/config/git/gitconfig.wsl" wsl: "~/dotfiles/config/git/gitconfig.wsl"
- name: Create u2f keys symlink
ansible.builtin.file:
src: "{{ item | replace('~', user_home) }}"
dest: "{{ user_home }}/.config/Yubico/u2f_keys"
state: link
force: yes
follow: false
loop:
- "~/dotfiles/config/Yubico/u2f_keys"
- name: Create SSH authorized_keys symlink - name: Create SSH authorized_keys symlink
ansible.builtin.file: ansible.builtin.file:
src: "{{ authorized_keys_mapping[hostname] | replace('~', user_home) }}" src: "{{ authorized_keys_mapping[hostname] | replace('~', user_home) }}"