aboutsummaryrefslogtreecommitdiff
path: root/roles/host/tasks/shell-helper.yml
diff options
context:
space:
mode:
authorspmfox <spmfox@foxwd.com>2024-08-27 17:34:55 -0400
committerspmfox <spmfox@foxwd.com>2024-08-27 17:34:55 -0400
commit5ca4fbf2cfe781efedc7c078acaa826c6ad39b10 (patch)
tree598ff2c8b51948091ffa1eb1fbb6ef6f7b26b776 /roles/host/tasks/shell-helper.yml
parent4aa6b11581718f66e711bf26fbb41e96fa3a4661 (diff)
converting to roles, converting from runlabels to quadlet ~ breaking change
Diffstat (limited to 'roles/host/tasks/shell-helper.yml')
-rw-r--r--roles/host/tasks/shell-helper.yml31
1 files changed, 31 insertions, 0 deletions
diff --git a/roles/host/tasks/shell-helper.yml b/roles/host/tasks/shell-helper.yml
new file mode 100644
index 0000000..e36784a
--- /dev/null
+++ b/roles/host/tasks/shell-helper.yml
@@ -0,0 +1,31 @@
+- name: Add bashrc for container service status on login
+ ansible.builtin.blockinfile:
+ path: "/home/{{ host_containers_user }}/.bashrc"
+ owner: "{{ host_containers_user }}"
+ group: "{{ host_containers_user }}"
+ create: true
+ block: "{{ host_shell_login_helper }}"
+
+- name: Check if fish shell is installed
+ ansible.builtin.stat:
+ path: "/usr/bin/fish"
+ register: fish
+
+- name: Block for fish
+ block:
+ - name: Create fish config directory
+ ansible.builtin.file:
+ path: "/home/{{ host_containers_user }}/.config/fish/conf.d"
+ state: directory
+ owner: "{{ host_containers_user }}"
+ group: "{{ host_containers_user }}"
+
+ - name: Add fish config for container service status on login
+ ansible.builtin.blockinfile:
+ path: "/home/{{ host_containers_user }}/.config/fish/conf.d/containers.fish"
+ owner: "{{ host_containers_user }}"
+ group: "{{ host_containers_user }}"
+ create: true
+ block: "{{ host_shell_login_helper }}"
+ when: fish.stat.exists
+ when: fish.stat.exists