From 5ca4fbf2cfe781efedc7c078acaa826c6ad39b10 Mon Sep 17 00:00:00 2001 From: spmfox Date: Tue, 27 Aug 2024 17:34:55 -0400 Subject: converting to roles, converting from runlabels to quadlet ~ breaking change --- roles/host/tasks/shell-helper.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 roles/host/tasks/shell-helper.yml (limited to 'roles/host/tasks/shell-helper.yml') 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 -- cgit