home · contact · privacy
In ansible attempt, differentiate symlink file directories.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 18 Mar 2017 04:35:47 +0000 (05:35 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 18 Mar 2017 04:35:47 +0000 (05:35 +0100)
31 files changed:
ansible/config.yml
ansible/dotfiles/bashrc [deleted file]
ansible/dotfiles/gitconfig [deleted file]
ansible/dotfiles/profile [deleted file]
ansible/dotfiles/shinit [deleted file]
ansible/dotfiles/shinit_color [deleted file]
ansible/dotfiles/vimrc [deleted file]
ansible/dotfiles/vimrc_add [deleted file]
ansible/files/___etc___apt___apt.conf.d___99mindeps [deleted file]
ansible/files/___etc___apt___sources.list [deleted file]
ansible/files/___etc___default___console-setup [deleted file]
ansible/files/___etc___default___keyboard [deleted file]
ansible/files/___etc___hostname [deleted file]
ansible/files/___etc___hosts [deleted file]
ansible/files/___etc___profile [deleted file]
ansible/files/___etc___timezone [deleted file]
ansible/files/console/___etc___default___console-setup [new file with mode: 0644]
ansible/files/console/___etc___default___keyboard [new file with mode: 0644]
ansible/files/dotfiles/bashrc [new file with mode: 0644]
ansible/files/dotfiles/gitconfig [new file with mode: 0644]
ansible/files/dotfiles/profile [new file with mode: 0644]
ansible/files/dotfiles/shinit [new file with mode: 0644]
ansible/files/dotfiles/shinit_color [new file with mode: 0644]
ansible/files/dotfiles/vimrc [new file with mode: 0644]
ansible/files/dotfiles/vimrc_add [new file with mode: 0644]
ansible/files/system/___etc___apt___apt.conf.d___99mindeps [new file with mode: 0644]
ansible/files/system/___etc___apt___sources.list [new file with mode: 0644]
ansible/files/system/___etc___hostname [new file with mode: 0644]
ansible/files/system/___etc___hosts [new file with mode: 0644]
ansible/files/system/___etc___profile [new file with mode: 0644]
ansible/files/system/___etc___timezone [new file with mode: 0644]

index 3afcbf7cedf2df0ac37cc2b4bb11ebe87a317044..b34b52940118653ad03a85f2212a94af8a74a1cf 100644 (file)
@@ -6,7 +6,7 @@
 
   - name: symlink system files
     file: state=link force=yes src={{item}} dest={{item|basename|regex_replace('___','/')}}
-    with_fileglob: ~/config/ansible/files/*
+    with_fileglob: ~/config/ansible/files/system/*
   - name: set hostname for current session
     shell: hostname w530
 
@@ -23,6 +23,9 @@
     apt: upgrade=dist
 
   # Configure console.
+  - name: symlink console config files
+    file: state=link force=yes src={{item}} dest={{item|basename|regex_replace('___','/')}}
+    with_fileglob: ~/config/ansible/files/console/*
   - name: ensure locales and console-setup are installed
     apt: name={{item}} state=present
     with_items:
@@ -36,7 +39,9 @@
   # Miscellaneous.
   - name: Ensure dotfile symlinks
     file: state=link force=yes src={{item}} dest=~/.{{item|basename}}
-    with_fileglob: ~/config/ansible/dotfiles/*
+    with_fileglob: ~/config/ansible/files/dotfiles/*
+  - name: ensure ~/.vimbackups directory
+    file: state=directory dest=~/.vimbackups
   - name: ensure man-db, manpages is installed
     apt: name={{item}} state=present
     with_items:
diff --git a/ansible/dotfiles/bashrc b/ansible/dotfiles/bashrc
deleted file mode 100644 (file)
index 4dc08f7..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# Bash as a non-login shell in non-POSIX-mode does not read in the startup
-# script at the path in $ENV. This forces it to still read in the ~/.shinit
-# startup script for non-login shells.
-
-. ~/.shinit
diff --git a/ansible/dotfiles/gitconfig b/ansible/dotfiles/gitconfig
deleted file mode 100644 (file)
index 5cdc162..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-[user]
-       name = Christian Heller
-       email = c.heller@plomlompom.de
diff --git a/ansible/dotfiles/profile b/ansible/dotfiles/profile
deleted file mode 100644 (file)
index 5a58435..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# Initialization for login shells.
-
-# Tell interactive shells to look in ~/.shinit for setup.
-ENV=$HOME/.shinit
-export ENV
-. $ENV
diff --git a/ansible/dotfiles/shinit b/ansible/dotfiles/shinit
deleted file mode 100644 (file)
index 25d1396..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# Settings for interactive shells.
-
-# Ensure shell truly is interactive to avoid confusing non-interactive shells.
-if [[ $- == *i* ]]; then
-
-    # Fancy colors for ls.
-    alias ls="ls --color=auto"
-
-    # Use vim as default editor for anything.
-    export VISUAL=vim
-    export EDITOR=$VISUAL
-
-    # Colored prompt with username, hostname, date/time, directory.
-    colornumber=7 # Default to white if no color set via colornumber dotfile.
-    colornumber_file=~/.shinit_color
-    if [ -f $colornumber_file ]; then
-        colornumber=`cat $colornumber_file`
-    fi
-    tput_color="$(tput setaf $colornumber)$(tput bold)"
-    tput_reset="$(tput sgr0)"
-    # Bash confuses the line length when not told to not count escape sequences.
-    if [ ! "$BASH" = "" ]; then
-        tput_color="\[$tput_color\]"
-        tput_reset="\[$tput_reset\]"
-    fi
-    PS1="${tput_color}["\$\(date\ +%Y-%m-%d/%H:%M:%S/%Z\)" $USER@$(hostname):"\$\(pwd\)"]$ $tput_reset"
-    PS2="${tput_color}> $tput_reset"
-    PS3="${tput_color}select: $tput_reset"
-    PS4="${tput_color}+ $tput_reset"
-
-    # Add local additions.
-    local_shinit_file=~/.shinit_add
-    if [ -f $local_shinit_file ]; then
-        . $local_shinit_file
-    fi
-
-fi
diff --git a/ansible/dotfiles/shinit_color b/ansible/dotfiles/shinit_color
deleted file mode 100644 (file)
index d00491f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/ansible/dotfiles/vimrc b/ansible/dotfiles/vimrc
deleted file mode 100644 (file)
index b1434ed..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-" Activate syntax highlighting.
-syntax on
-filetype plugin on
-
-" Number lines.
-set number
-
-" Don't add unsolicited final newline.
-set binary
-
-" Indentation rules (tabs to 4 spaces).
-set expandtab
-set shiftwidth=2
-set softtabstop=2
-
-" Backups.
-set backup
-set backupdir=~/.vimbackups
-let myvar = strftime("%Y-%m-%d_%H-%M-%S")
-let myvar = "set backupext=_". myvar
-execute myvar
-
-" Keep syntax highlighting healthy.
-autocmd BufEnter * :syntax sync fromstart
-
-" Mark the 80-th column.
-set colorcolumn=80
-
-" Source additions
-source ~/.vimrc_add
diff --git a/ansible/dotfiles/vimrc_add b/ansible/dotfiles/vimrc_add
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/ansible/files/___etc___apt___apt.conf.d___99mindeps b/ansible/files/___etc___apt___apt.conf.d___99mindeps
deleted file mode 100644 (file)
index 4aaef79..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-APT::AutoRemove::RecommendsImportant "false";
-APT::AutoRemove::SuggestsImportant "false";
-APT::Install-Recommends "false";
-APT::Install-Suggests "false";
diff --git a/ansible/files/___etc___apt___sources.list b/ansible/files/___etc___apt___sources.list
deleted file mode 100644 (file)
index e64d6ee..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-deb http://ftp.debian.org/debian/ stretch main contrib non-free
-deb http://ftp.debian.org/debian/ stretch-updates main contrib non-free
-deb http://ftp.debian.org/debian stretch-backports main contrib non-free
-deb http://security.debian.org/ stretch/updates main contrib non-free
diff --git a/ansible/files/___etc___default___console-setup b/ansible/files/___etc___default___console-setup
deleted file mode 100644 (file)
index 090d241..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CHARMAP="UTF-8"
-CODESET="Lat15"
-FONTFACE="Terminus"
-FONTSIZE="6x12"
diff --git a/ansible/files/___etc___default___keyboard b/ansible/files/___etc___default___keyboard
deleted file mode 100644 (file)
index b8f918b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-XKBLAYOUT="de"
diff --git a/ansible/files/___etc___hostname b/ansible/files/___etc___hostname
deleted file mode 100644 (file)
index 8769fca..0000000
+++ /dev/null
@@ -1 +0,0 @@
-w530
diff --git a/ansible/files/___etc___hosts b/ansible/files/___etc___hosts
deleted file mode 100644 (file)
index d920e4f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-127.0.0.1      localhost
-127.0.1.1      w530
-
-# The following lines are desirable for IPv6 capable hosts
-::1     localhost ip6-localhost ip6-loopback
-ff02::1 ip6-allnodes
-ff02::2 ip6-allrouters
diff --git a/ansible/files/___etc___profile b/ansible/files/___etc___profile
deleted file mode 100644 (file)
index 5884d7b..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
-# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
-
-if [ "`id -u`" -eq 0 ]; then
-  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
-else
-  PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
-fi
-export PATH
-
-if [ "${PS1-}" ]; then
-  if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then
-    # The file bash.bashrc already sets the default PS1.
-    # PS1='\h:\w\$ '
-    if [ -f /etc/bash.bashrc ]; then
-      . /etc/bash.bashrc
-    fi
-  else
-    if [ "`id -u`" -eq 0 ]; then
-      PS1='# '
-    else
-      PS1='$ '
-    fi
-  fi
-fi
-
-if [ -d /etc/profile.d ]; then
-  for i in /etc/profile.d/*.sh; do
-    if [ -r $i ]; then
-      . $i
-    fi
-  done
-  unset i
-fi
-export LC_ALL="en_US.UTF-8"
diff --git a/ansible/files/___etc___timezone b/ansible/files/___etc___timezone
deleted file mode 100644 (file)
index 94d5acc..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Europe/Berlin
diff --git a/ansible/files/console/___etc___default___console-setup b/ansible/files/console/___etc___default___console-setup
new file mode 100644 (file)
index 0000000..090d241
--- /dev/null
@@ -0,0 +1,4 @@
+CHARMAP="UTF-8"
+CODESET="Lat15"
+FONTFACE="Terminus"
+FONTSIZE="6x12"
diff --git a/ansible/files/console/___etc___default___keyboard b/ansible/files/console/___etc___default___keyboard
new file mode 100644 (file)
index 0000000..b8f918b
--- /dev/null
@@ -0,0 +1 @@
+XKBLAYOUT="de"
diff --git a/ansible/files/dotfiles/bashrc b/ansible/files/dotfiles/bashrc
new file mode 100644 (file)
index 0000000..4dc08f7
--- /dev/null
@@ -0,0 +1,5 @@
+# Bash as a non-login shell in non-POSIX-mode does not read in the startup
+# script at the path in $ENV. This forces it to still read in the ~/.shinit
+# startup script for non-login shells.
+
+. ~/.shinit
diff --git a/ansible/files/dotfiles/gitconfig b/ansible/files/dotfiles/gitconfig
new file mode 100644 (file)
index 0000000..5cdc162
--- /dev/null
@@ -0,0 +1,3 @@
+[user]
+       name = Christian Heller
+       email = c.heller@plomlompom.de
diff --git a/ansible/files/dotfiles/profile b/ansible/files/dotfiles/profile
new file mode 100644 (file)
index 0000000..5a58435
--- /dev/null
@@ -0,0 +1,6 @@
+# Initialization for login shells.
+
+# Tell interactive shells to look in ~/.shinit for setup.
+ENV=$HOME/.shinit
+export ENV
+. $ENV
diff --git a/ansible/files/dotfiles/shinit b/ansible/files/dotfiles/shinit
new file mode 100644 (file)
index 0000000..25d1396
--- /dev/null
@@ -0,0 +1,37 @@
+# Settings for interactive shells.
+
+# Ensure shell truly is interactive to avoid confusing non-interactive shells.
+if [[ $- == *i* ]]; then
+
+    # Fancy colors for ls.
+    alias ls="ls --color=auto"
+
+    # Use vim as default editor for anything.
+    export VISUAL=vim
+    export EDITOR=$VISUAL
+
+    # Colored prompt with username, hostname, date/time, directory.
+    colornumber=7 # Default to white if no color set via colornumber dotfile.
+    colornumber_file=~/.shinit_color
+    if [ -f $colornumber_file ]; then
+        colornumber=`cat $colornumber_file`
+    fi
+    tput_color="$(tput setaf $colornumber)$(tput bold)"
+    tput_reset="$(tput sgr0)"
+    # Bash confuses the line length when not told to not count escape sequences.
+    if [ ! "$BASH" = "" ]; then
+        tput_color="\[$tput_color\]"
+        tput_reset="\[$tput_reset\]"
+    fi
+    PS1="${tput_color}["\$\(date\ +%Y-%m-%d/%H:%M:%S/%Z\)" $USER@$(hostname):"\$\(pwd\)"]$ $tput_reset"
+    PS2="${tput_color}> $tput_reset"
+    PS3="${tput_color}select: $tput_reset"
+    PS4="${tput_color}+ $tput_reset"
+
+    # Add local additions.
+    local_shinit_file=~/.shinit_add
+    if [ -f $local_shinit_file ]; then
+        . $local_shinit_file
+    fi
+
+fi
diff --git a/ansible/files/dotfiles/shinit_color b/ansible/files/dotfiles/shinit_color
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
diff --git a/ansible/files/dotfiles/vimrc b/ansible/files/dotfiles/vimrc
new file mode 100644 (file)
index 0000000..b1434ed
--- /dev/null
@@ -0,0 +1,30 @@
+" Activate syntax highlighting.
+syntax on
+filetype plugin on
+
+" Number lines.
+set number
+
+" Don't add unsolicited final newline.
+set binary
+
+" Indentation rules (tabs to 4 spaces).
+set expandtab
+set shiftwidth=2
+set softtabstop=2
+
+" Backups.
+set backup
+set backupdir=~/.vimbackups
+let myvar = strftime("%Y-%m-%d_%H-%M-%S")
+let myvar = "set backupext=_". myvar
+execute myvar
+
+" Keep syntax highlighting healthy.
+autocmd BufEnter * :syntax sync fromstart
+
+" Mark the 80-th column.
+set colorcolumn=80
+
+" Source additions
+source ~/.vimrc_add
diff --git a/ansible/files/dotfiles/vimrc_add b/ansible/files/dotfiles/vimrc_add
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/ansible/files/system/___etc___apt___apt.conf.d___99mindeps b/ansible/files/system/___etc___apt___apt.conf.d___99mindeps
new file mode 100644 (file)
index 0000000..4aaef79
--- /dev/null
@@ -0,0 +1,4 @@
+APT::AutoRemove::RecommendsImportant "false";
+APT::AutoRemove::SuggestsImportant "false";
+APT::Install-Recommends "false";
+APT::Install-Suggests "false";
diff --git a/ansible/files/system/___etc___apt___sources.list b/ansible/files/system/___etc___apt___sources.list
new file mode 100644 (file)
index 0000000..e64d6ee
--- /dev/null
@@ -0,0 +1,4 @@
+deb http://ftp.debian.org/debian/ stretch main contrib non-free
+deb http://ftp.debian.org/debian/ stretch-updates main contrib non-free
+deb http://ftp.debian.org/debian stretch-backports main contrib non-free
+deb http://security.debian.org/ stretch/updates main contrib non-free
diff --git a/ansible/files/system/___etc___hostname b/ansible/files/system/___etc___hostname
new file mode 100644 (file)
index 0000000..8769fca
--- /dev/null
@@ -0,0 +1 @@
+w530
diff --git a/ansible/files/system/___etc___hosts b/ansible/files/system/___etc___hosts
new file mode 100644 (file)
index 0000000..d920e4f
--- /dev/null
@@ -0,0 +1,7 @@
+127.0.0.1      localhost
+127.0.1.1      w530
+
+# The following lines are desirable for IPv6 capable hosts
+::1     localhost ip6-localhost ip6-loopback
+ff02::1 ip6-allnodes
+ff02::2 ip6-allrouters
diff --git a/ansible/files/system/___etc___profile b/ansible/files/system/___etc___profile
new file mode 100644 (file)
index 0000000..5884d7b
--- /dev/null
@@ -0,0 +1,35 @@
+# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
+# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
+
+if [ "`id -u`" -eq 0 ]; then
+  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+else
+  PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
+fi
+export PATH
+
+if [ "${PS1-}" ]; then
+  if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then
+    # The file bash.bashrc already sets the default PS1.
+    # PS1='\h:\w\$ '
+    if [ -f /etc/bash.bashrc ]; then
+      . /etc/bash.bashrc
+    fi
+  else
+    if [ "`id -u`" -eq 0 ]; then
+      PS1='# '
+    else
+      PS1='$ '
+    fi
+  fi
+fi
+
+if [ -d /etc/profile.d ]; then
+  for i in /etc/profile.d/*.sh; do
+    if [ -r $i ]; then
+      . $i
+    fi
+  done
+  unset i
+fi
+export LC_ALL="en_US.UTF-8"
diff --git a/ansible/files/system/___etc___timezone b/ansible/files/system/___etc___timezone
new file mode 100644 (file)
index 0000000..94d5acc
--- /dev/null
@@ -0,0 +1 @@
+Europe/Berlin