From 918ce20737dd21aaa930f7680a77c1773939e3a1 Mon Sep 17 00:00:00 2001 From: TechDufus Date: Fri, 17 Nov 2023 12:09:30 -0600 Subject: [PATCH] Improving oh_my_bash install location. --- roles/bash/handlers/main.yml | 5 +++++ roles/bash/tasks/ubuntu.yml | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/roles/bash/handlers/main.yml b/roles/bash/handlers/main.yml index 4ed8f1a8..cee386ff 100644 --- a/roles/bash/handlers/main.yml +++ b/roles/bash/handlers/main.yml @@ -3,3 +3,8 @@ ansible.builtin.file: path: /tmp/oh-my-bash.install.sh state: absent + +- name: Bash | Cleanup oh-my-bash install script + ansible.builtin.file: + path: /{{ ansible_user_dir }}/oh-my-bash.install.sh + state: absent diff --git a/roles/bash/tasks/ubuntu.yml b/roles/bash/tasks/ubuntu.yml index 79793078..1b8c0429 100644 --- a/roles/bash/tasks/ubuntu.yml +++ b/roles/bash/tasks/ubuntu.yml @@ -18,14 +18,15 @@ - name: "Bash | Download oh-my-bash Install Script" ansible.builtin.get_url: url: https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh - dest: /tmp/oh-my-bash.install.sh + dest: /{{ ansible_user_dir }}/oh-my-bash.install.sh force: true mode: 755 + notify: + - "Bash | Cleanup oh-my-bash install script" - name: "Bash | Run the install script" ansible.builtin.script: - cmd: /tmp/oh-my-bash.install.sh - + cmd: /{{ ansible_user_dir }}/oh-my-bash.install.sh - name: "Bash | Copy .bashrc" ansible.builtin.copy: