Ensure ansible.cfg is referenced no matter the directory

This commit is contained in:
Curt Spark 2024-03-18 11:27:09 +00:00
parent d6adcfebc2
commit 9e31dd69af
1 changed files with 11 additions and 0 deletions

View File

@ -60,6 +60,17 @@
regexp: 'persist' regexp: 'persist'
replace: 'nopass' 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 # System Setup
- name: Ensure .bashrc is updated - name: Ensure .bashrc is updated
template: template: