From 93124f37f3c632dfcb4942ddc9bcd9ee9f681b61 Mon Sep 17 00:00:00 2001 From: cspark Date: Tue, 19 Mar 2024 13:47:59 +0000 Subject: [PATCH] Ensure ansible.cfg is referenced no matter the directory --- home_resources/.bashrc | 5 +++-- server-setup.yml | 11 +++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/home_resources/.bashrc b/home_resources/.bashrc index 971c38e..604b848 100755 --- a/home_resources/.bashrc +++ b/home_resources/.bashrc @@ -120,8 +120,9 @@ export ANSIBLECONF_DIR="{{ ansibleconf_directory }}" export EDITOR=vim +# Fixes unexpected behaviour in certain terminals when in SSH +export TERM=vt100 + neofetch # List all open ports and their associated programs ss -tulpn -# List ZFS pools status -zpool status diff --git a/server-setup.yml b/server-setup.yml index 771f01e..9c20b0e 100755 --- a/server-setup.yml +++ b/server-setup.yml @@ -52,6 +52,17 @@ regexp: 'persist' replace: 'nopass' + # Environment Variables config + - name: Configure environment variables + become: yes + lineinfile: + path: "/etc/environment" + state: present + regexp: "^{{ item.key }}=" + line: "{{ item.key }}={{ item.value}}" + loop: + - { key: "ANSIBLE_CONFIG", value: "{{ ansibleconf_directory }}/ansible.cfg" } + # System Setup - name: Ensure .bashrc is updated template: