aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspmfox <spmfox@foxwd.com>2024-02-13 20:35:43 -0500
committerspmfox <spmfox@foxwd.com>2024-02-13 20:35:43 -0500
commit88c2fe720cd9d0861ceb713848c60edf431149a2 (patch)
tree2b7e9159db9bc32f34b9195a4083e3bff6aaae9e
parent46605d0b074c14c6f87b499bf5c1971e3b7d4a0e (diff)
adding shell defaults for container status on login
-rw-r--r--host.yml32
1 files changed, 32 insertions, 0 deletions
diff --git a/host.yml b/host.yml
index 151dadf..e2f9dc3 100644
--- a/host.yml
+++ b/host.yml
@@ -6,6 +6,38 @@
ansible.builtin.user:
name: "containers"
+ - name: Add bashrc for container service status on login
+ ansible.builtin.blockinfile:
+ path: "/home/containers/.bashrc"
+ owner: "containers"
+ group: "containers"
+ create: true
+ block: |
+ echo ""
+ systemctl --user list-units 'container-*' -q
+ echo ""
+ podman container list --all
+ echo ""
+
+ - name: Check if fish shell is installed
+ ansible.builtin.stat:
+ path: "/usr/bin/fish"
+ register: fish
+
+ - name: Add fish config for container service status on login
+ ansible.builtin.blockinfile:
+ path: "/home/containers/.config/fish/conf.d/containers.fish"
+ owner: "containers"
+ group: "containers"
+ create: true
+ block: |
+ echo ""
+ systemctl --user list-units 'container-*' -q
+ echo ""
+ podman container list --all
+ echo ""
+ when: fish.stat.exists
+
- name: Install systemd-container and podman
ansible.builtin.package:
name: