From 8dca876bbcfe3e2f39e568535a19b11786b0a9d5 Mon Sep 17 00:00:00 2001 From: Jeltz Date: Thu, 16 Dec 2021 05:48:39 +0100 Subject: [PATCH] Add a very simple bashrc for root --- roles/root_account/tasks/main.yml | 8 ++++++++ roles/root_account/templates/bashrc.j2 | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 roles/root_account/templates/bashrc.j2 diff --git a/roles/root_account/tasks/main.yml b/roles/root_account/tasks/main.yml index d95c1ba..be0b984 100644 --- a/roles/root_account/tasks/main.yml +++ b/roles/root_account/tasks/main.yml @@ -4,4 +4,12 @@ name: root shell: "{{ root_shell }}" password: "{{ root_password }}" + +- name: Setup bashrc for root + template: + src: bashrc.j2 + dest: /root/.bashrc + owner: root + group: root + mode: u=r,g=,o= ... diff --git a/roles/root_account/templates/bashrc.j2 b/roles/root_account/templates/bashrc.j2 new file mode 100644 index 0000000..d53befb --- /dev/null +++ b/roles/root_account/templates/bashrc.j2 @@ -0,0 +1,9 @@ +{{ ansible_managed | comment }} + +PS1='\[\e[1;31m\]$(hostname -f)\[\e[0m\] \w \[\e[1;36m\]\$\[\e[0m\] ' + +export LS_OPTIONS='--color=auto' +eval "$(dircolors)" +alias ls='ls $LS_OPTIONS' +alias ll='ls $LS_OPTIONS -l' +alias l='ls $LS_OPTIONS -lA'