diff --git a/basics.yml b/basics.yml index 9570726..35dac7d 100644 --- a/basics.yml +++ b/basics.yml @@ -190,14 +190,6 @@ name: Europe/Berlin when: nocontainer.stat.exists == true -# - name: Create {{ ansible_facts['hostname'] }}adm User -# ansible.builtin.user: -# name: "{{ ansible_facts['hostname'] }}adm" -# comment: "{{ ansible_facts['hostname'] }}-Admin" -# uid: 1000 -# group: users -# password: $6$Zqar9GCRvbVgPlZ/$L2xAMekMjE5PXuWY0WbmUcugJkqD14O6/cgC02O0hT5vOdiDj5Pcp6FU/Zz.rCkWKVSPsmTc2OtXAmQIHLc1V1 - - name: Allow the hostnameadm User all sudo commands community.general.sudoers: name: ALL @@ -348,28 +340,24 @@ group: root marker: "# {mark} ANSIBLE MANAGED BLOCK" block: | - if ${use_color} ; then - if [ ${USER} = root ] ; then - PS1='\[\033[01;31m\]\h\[\033[01;34m\] \w \$\[\033[00m\] ' - else - PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] ' - fi - export EDITOR="/usr/bin/vim" - export HISTSIZE= - export HISTFILESIZE= - export HISTTIMEFORMAT="[%F %T] " - if [ -f /etc/debian_version ] - then - export DEBIAN_FRONTEND='noninteractive' - export LANG="en_US.UTF-8" - alias ls='ls --color=auto' - alias grep='grep --colour=auto' - alias egrep='egrep --colour=auto' - alias fgrep='fgrep --colour=auto' - fi + if [ "${USER}" = root ] + then + PS1='\[\033[01;31m\]\h\[\033[01;34m\] \w \$\[\033[00m\] ' else - # show root@ when we don't have colors - PS1+='\u@\h \w \$' + PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] ' + fi + export EDITOR="/usr/bin/vim" + export HISTSIZE= + export HISTFILESIZE= + export HISTTIMEFORMAT="[%F %T] " + if [ -f /etc/debian_version ] + then + export DEBIAN_FRONTEND='noninteractive' + export LANG="en_US.UTF-8" + alias ls='ls --color=auto' + alias grep='grep --colour=auto' + alias egrep='egrep --colour=auto' + alias fgrep='fgrep --colour=auto' fi # execute for linuxmint if [ -d /etc/linuxmint ]