|
@@ -182,3 +182,27 @@
|
|
|
- item.command is defined
|
|
|
- ansible_os_family != 'LibreELEC'
|
|
|
tags: aliases
|
|
|
+
|
|
|
+
|
|
|
+- name: Enforce .bash_profile
|
|
|
+ ansible.builtin.template:
|
|
|
+ src: bash_profile.j2
|
|
|
+ dest: /root/.bash_profile
|
|
|
+ owner: root
|
|
|
+ group: root
|
|
|
+ mode: '0640'
|
|
|
+
|
|
|
+
|
|
|
+- name: Enforce .bashrc aliases for ll (Debian)
|
|
|
+ ansible.builtin.lineinfile:
|
|
|
+ path: /root/.bashrc
|
|
|
+ regexp: "{{ item.regexp }}"
|
|
|
+ line: "{{ item.line }}"
|
|
|
+ loop:
|
|
|
+ - { 'regexp': '^#?\s*export LS_OPTIONS=', 'line': "export LS_OPTIONS='--color=auto'" }
|
|
|
+ - { 'regexp': '^#?\s*eval \"$(dircolors)\"', 'line': "eval \"$(dircolors)\"" }
|
|
|
+ - { "regexp": '^#?\s*alias ls=', 'line': "alias ls='ls $LS_OPTIONS'" }
|
|
|
+ - { "regexp": '^#?\s*alias ll=', 'line': "alias ll='ls $LS_OPTIONS -lh'" }
|
|
|
+ - { "regexp": '^#?\s*alias l=', 'line': "alias l='ls $LS_OPTIONS -lA'" }
|
|
|
+ when:
|
|
|
+ - ansible_distribution == 'Debian'
|