Changeset - 960c45b6d751
[Not reviewed]
0 1 0
x - 20 months ago 2023-08-29 18:14:50
xbr@c3l.lu
feat: initial server, colorful PS1 in global bashrc
1 file changed with 15 insertions and 0 deletions:
0 comments (0 inline, 0 general)
initial_server_setup/initial_setup.yml
Show inline comments
 
@@ -120,6 +120,21 @@
 
        name: "root"
 
        shell: /bin/bash
 
      tags: users
 
    - name: Add colorful PS1 in default bashrc
 
      ansible.builtin.blockinfile:
 
        path: /etc/bash.bashrc
 
        marker: "# {mark} ANSIBLE MANAGED BLOCK / Colorful PS1"
 
        block: |
 
          case "$TERM" in
 
              xterm-color|*-256color) color_prompt=yes;;
 
          esac
 

	
 
          if [ "$color_prompt" = yes ]; then
 
              PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
 
          else
 
              PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
 
          fi
 
          unset color_prompt force_color_prompt
 

	
 
    - name: Add SSH key for users from vars
 
      ansible.posix.authorized_key:
0 comments (0 inline, 0 general)