diff --git a/linux/base-config-debian/roles/config-root-user/tasks/main.yaml b/linux/base-config-debian/roles/config-root-user/tasks/main.yaml index d19f1ca..e024019 100644 --- a/linux/base-config-debian/roles/config-root-user/tasks/main.yaml +++ b/linux/base-config-debian/roles/config-root-user/tasks/main.yaml @@ -38,4 +38,47 @@ path: "{{ source_path_ssh }}" state: absent notify: Restart ssh service -#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file +#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +# changes .BASHRC file of root user +# step1 - uncomment lines +- name: uncomment this lines + lineinfile: + dest: "{{ path_bashrc_root }}" + regexp: "{{item.regexp}}" + line: "{{item.line}}" + state: present + with_items: + - regexp: "^# export LS_OPTIONS" + line: "export LS_OPTIONS='--color=auto'" + - regexp: "^# eval "$(dircolors)"" + line: "eval "$(dircolors)"" + - regexp: "^# alias ls='ls $LS_OPTIONS'" + line: "alias ls='ls $LS_OPTIONS'" + - regexp: "^# alias ll='ls $LS_OPTIONS -l'" + line: "alias ll='ls $LS_OPTIONS -l'" + - regexp: "# alias l='ls $LS_OPTIONS -lA'" + line: "alias l='ls $LS_OPTIONS -lA'" +#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +# step2 - add block lines +- name: add block lines + blockinfile: + path: "{{ path_bashrc_root }}" + block: | + ### 4Loooong memories + HISTSIZE=10000 + HISTFILESIZE=20000 + ### 4security + TMOUT=3600 + ### write auto label + # If this is an xterm set the title to user@host:dir + case "$TERM" in + xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; + *) + ;; + esac + source /etc/profile.d/bash_completion.sh +#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/linux/base-config-debian/roles/config-root-user/vars/main.yaml b/linux/base-config-debian/roles/config-root-user/vars/main.yaml index 88d9bbc..64437b1 100644 --- a/linux/base-config-debian/roles/config-root-user/vars/main.yaml +++ b/linux/base-config-debian/roles/config-root-user/vars/main.yaml @@ -1,3 +1,4 @@ --- source_path_ssh: /etc/ssh/sshd_config.orig dest_path_ssh: /etc/ssh/sshd_config +path_bashrc_root: /root/.bashrc \ No newline at end of file