1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-22 15:01:59 +01:00

littles fixes

This commit is contained in:
eoli3n 2017-12-27 14:32:59 +01:00
parent 7efa195c4a
commit d755786857
11 changed files with 191 additions and 62 deletions

50
TODO

@ -1,23 +1,31 @@
- TODO: borgbackup conf
- TODO: tmux and configure
- TOTEST: ansible provisionner vagrant : https://github.com/hashicorp/vagrant/issues/7890
- TODO: change includes in import tasks to be able to resolv with list-tasks
- TOFIX: chsh in vagrant config file for FreeBSD
- TOTEST: powerlines
- TOTEST: vagrant centos locales fr ?
- TOTEST: configure root account ?
- TODO: check best install method all distrib powerline
- TODO: clean zshrc
- TODO: Ubuntu compat and vagrant for server tag
- TODO: Debian/Ubuntu/CentOS/FreeBSD compat and vagrant for desktop/laptop tag
- TODO: Add a tag "dotfiles", and pass every copy/templates/file with dest={{ dotsroot }}
# TODO
- borgbackup: install and configure role
- tmux: install and configure role
- playbook: change includes in import tasks to be able to resolv with list-tasks
- powerline: check best install method all distrib
- zsh: check neon specific alias and others
- playbook: update all vagrant specific task to match docker hosts
# TOFIX
- vagrant: chsh in vagrant config file for FreeBSD
- powerline: not working with centos|debian|freebsd
- zsh: clean zshrc template
- playbook: add {{ tag }} to fail module to print in "limit to distrib" task
- vagrant: tty in qwerty for debian keyboard
# TOTEST
- playbook: as root working ?
# FEATURE IDEA
- playbook: Add a tag "dotfiles", and pass every copy/templates/file with dest={{ dotsroot }}
then : ansible-playbook localhost install.yml -t dotfiles -e 'dotsroot: tmp'
to compile only dotfiles in an example dir ~/tmp ? what about lineinfile module ?
- TODO: Add {{ tag }} to fail module to limit to distrib
- TOFIX: get current branch to checkout in Dockerfile var
https://superuser.com/questions/701735/run-script-on-host-machine-during-vagrant-up
git symbolic-ref --short -q HEAD
- TODO: update all vagrant specific task to match docker tasks
- TODO: install virtual display xephyr
- TODO: docker autobuild to docker run directly, edit README.md
- TODO: grep -ri 'git clone', dynamic git branch ?
- vagrant: ansible provisionner -> https://github.com/hashicorp/vagrant/issues/7890
- all: Ubuntu compat|docker|vagrant for server tag
- all: Debian|Ubuntu|CentOS|FreeBSD compat|docker|vagrant for desktop/laptop tag
- docker: install virtual display xephyr to use docker as vagrant
- docker: autobuild to docker run directly without building locally

@ -1,10 +1,10 @@
FROM debian:stable
# Locales keyboard
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
RUN apt-get update && apt-get install -y locales \
&& localedef -i fr_FR -c -f UTF-8 -A /usr/share/locale/locale.alias fr_FR.UTF-8
ENV LANG fr_FR.UTF-8
# Debian Deps
RUN apt-get update && apt-get install -y \
RUN apt-get install -y \
sudo \
binutils \
util-linux \
@ -20,7 +20,7 @@ ENV PATH="${PATH}:/usr/bin/core_perl"
# Project deps
RUN echo 'deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main' >> /etc/apt/sources.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
RUN apt-get update && apt-get install -y \
RUN apt-get install -y \
ansible \
git
# Create test user
@ -34,7 +34,6 @@ WORKDIR /home/test/
ENV LANG="fr_FR.UTF-8"
RUN mkdir dotfiles
COPY . dotfiles/
RUN chown -R test:test dotfiles
RUN cd dotfiles; ./install.sh server | tee ansible.log
RUN sudo chsh -s '/usr/bin/zsh' test
ENTRYPOINT /usr/bin/zsh

@ -54,17 +54,13 @@ dupkg() { expac '%m\t%n' | sort -h | awk '{cmd = "numfmt --to=si "$1; cmd | getl
dupkg_ex() { expac -H M "%011m\t%-20n\t%10d" $(comm -23 <(pacman -Qqen | sort) <(pacman -Qqg base base-devel | sort)) | sort -n }
### EXPORTS
export LANG='fr_FR.UTF-8'
export EDITOR='vim'
export VISUAL='vim'
export BROWSER='google-chrome-stable'
export POWERLINE_CONFIG_COMMAND='powerline-config'
export PAGER='most'
if [[ $TERM == xterm-termite ]] && [[ -z "$SSH_CLIENT" ]] || [[ -z "$SSH_TTY" ]]; then
. /etc/profile.d/vte.sh
__vte_osc7
fi
### ZSHRC NODE
source ~/.zshrc_node

@ -1,12 +1,7 @@
https://asciinema.org/a/BHA2aFe0yq9vbBuEx5QCFPhKx?speed=5
[![asciicast](https://asciinema.org/a/BHA2aFe0yq9vbBuEx5QCFPhKx.png)](https://asciinema.org/a/BHA2aFe0yq9vbBuEx5QCFPhKx?speed=5&autoplay=1)
# Dependencies
- Vagrant
- Virtualbox
- 900M free on $HOME for Archlinux vagrant box ``~/.vagrant.d/boxes/terrywang-VAGRANTSLASH-archlinux``
- \~6G free on $HOME for Archlinux virtualbox VM ``~/VirtualBox\ VMs/archlinux_dotfiles``
# Provision
@ -15,13 +10,14 @@ This is fully automatised
```
git clone --recursive https://github.com/eoli3n/dotfiles
cd dotfiles
cd vagrant/archlinux
git checkout <master|dev>
cd vagrant/<archlinx|debian|centos|freebsd>
vagrant up
```
# Test
- Launch virtualbox GUI, open ``archlinux-dotfiles`` VM
- Launch virtualbox GUI, open VM
- Login in TTY
- Login : ``vagrant``
- Password : ``vagrant``
@ -31,10 +27,11 @@ vagrant up
- Suppress Virtualbox VM
```
cd ~/dotfiles/vagrant/archlinux
cd ~/dotfiles/vagrant/<archlinx|debian|centos|freebsd>
vagrant destroy
```
- Suppress Vagrant box
```
vagrant box remove terrywang/archlinux
vagrant box list
vagrant box remove <box>
```

@ -36,21 +36,21 @@ Vagrant.configure("2") do |config|
# DEPS
pacman -S ansible jshon --noconfirm
pacman -R cowsay --noconfirm || :
# DOTFILES DIR
mkdir -p /home/vagrant/dotfiles
SHELL
config.vm.synced_folder "../../", "/home/vagrant/dotfiles/", type: "rsync", rsync__exclude: [".git/", ".vagrant.d/"]
$script = <<-SCRIPT
# PREP
touch ~/.viminfo; rm ~/.viminfo
touch ~/.vimrc; rm ~/.vimrc
# EXEC
git clone --recursive https://github.com/eoli3n/dotfiles
cd dotfiles
git submodule update --init --recursive
cd /tmp
curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=packer-git; makepkg PKGBUILD --install --needed --noconfirm
cd -
./install.sh desktop
echo -e "vagrant\n/usr/bin/zsh" | chsh
cd dotfiles
./install.sh desktop && echo -e "vagrant\n/usr/bin/zsh" | chsh
SCRIPT
config.vm.provision "shell", inline: $script, privileged: false

37
vagrant/centos/README.md Normal file

@ -0,0 +1,37 @@
# Dependencies
- Vagrant
- Virtualbox
# Provision
This is fully automatised
```
git clone --recursive https://github.com/eoli3n/dotfiles
cd dotfiles
git checkout <master|dev>
cd vagrant/<archlinx|debian|centos|freebsd>
vagrant up
```
# Test
- Launch virtualbox GUI, open VM
- Login in TTY
- Login : ``vagrant``
- Password : ``vagrant``
- ``startx``
# Clean after test
- Suppress Virtualbox VM
```
cd ~/dotfiles/vagrant/<archlinx|debian|centos|freebsd>
vagrant destroy
```
- Suppress Vagrant box
```
vagrant box list
vagrant box remove <box>
```

@ -3,6 +3,7 @@
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.hostname = "centos"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
@ -15,21 +16,30 @@ Vagrant.configure("2") do |config|
end
config.vm.provision "shell", inline: <<-SHELL
# LOCALES
sed -i 's/^\(override_install_langs.*\)$/#\1/' /etc/yum.conf
yum -y -q reinstall glibc-common
echo 'LANG="fr_FR.UTF-8"' > /etc/locale.conf
source /etc/locale.conf
# KEYBOARD
loadkeys fr
localectl set-keymap fr
localectl set-x11-keymap fr
# DEPS
yum install ansible git -y
echo "centos" > /etc/hostname
hostname centos
# DOTFILES DIR
mkdir -p /home/vagrant/dotfiles
SHELL
config.vm.synced_folder "../../", "/home/vagrant/dotfiles/", type: "rsync", rsync__exclude: [".git/", ".vagrant.d/"]
$script = <<-SCRIPT
# PREP
touch ~/.viminfo; rm ~/.viminfo
touch ~/.vimrc; rm ~/.vimrc
# EXEC
git clone --recursive https://github.com/eoli3n/dotfiles
cd dotfiles
git submodule update --init --recursive
./install.sh server
echo -e "vagrant" | chsh -s /bin/zsh
./install.sh server && echo -e "vagrant" | chsh -s /bin/zsh
SCRIPT
config.vm.provision "shell", inline: $script, privileged: false

37
vagrant/debian/README.md Normal file

@ -0,0 +1,37 @@
# Dependencies
- Vagrant
- Virtualbox
# Provision
This is fully automatised
```
git clone --recursive https://github.com/eoli3n/dotfiles
cd dotfiles
git checkout <master|dev>
cd vagrant/<archlinx|debian|centos|freebsd>
vagrant up
```
# Test
- Launch virtualbox GUI, open VM
- Login in TTY
- Login : ``vagrant``
- Password : ``vagrant``
- ``startx``
# Clean after test
- Suppress Virtualbox VM
```
cd ~/dotfiles/vagrant/<archlinx|debian|centos|freebsd>
vagrant destroy
```
- Suppress Vagrant box
```
vagrant box list
vagrant box remove <box>
```

@ -3,7 +3,7 @@
Vagrant.configure("2") do |config|
config.vm.box = "debian/jessie64"
config.vm.hostname = "debian"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
#vb.gui = true
@ -15,26 +15,32 @@ Vagrant.configure("2") do |config|
end
config.vm.provision "shell", inline: <<-SHELL
# LOCALES
apt-get update && apt-get install -y locales
localedef -i fr_FR -c -f UTF-8 -A /usr/share/locale/locale.alias fr_FR.UTF-8
echo 'LANG="fr_FR.UTF-8"' > /etc/locale.conf
# KEYBOARD
loadkeys fr
localectl set-keymap fr
localectl set-x11-keymap fr
# DEPS
echo 'deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main' >> /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
apt update
apt install git ansible -y
# HOSTNAME
echo "debian" > /etc/hostname
echo "127.0.0.1 localhost localhost.localdomain debian" > /etc/hosts
hostname debian
# DOTFILES DIR
mkdir -p /home/vagrant/dotfiles
SHELL
config.vm.synced_folder "../../", "/home/vagrant/dotfiles/", type: "rsync", rsync__exclude: [".git/", ".vagrant.d/"]
$script = <<-SCRIPT
# PREP
touch ~/.viminfo; rm ~/.viminfo
touch ~/.vimrc; rm ~/.vimrc
# EXEC
git clone --recursive https://github.com/eoli3n/dotfiles
cd dotfiles
git submodule update --init --recursive
./install.sh server
echo -e "vagrant\n/usr/bin/zsh" | chsh
./install.sh server && echo -e "vagrant\n/usr/bin/zsh" | chsh
SCRIPT
config.vm.provision "shell", inline: $script, privileged: false

37
vagrant/freebsd/README.md Normal file

@ -0,0 +1,37 @@
# Dependencies
- Vagrant
- Virtualbox
# Provision
This is fully automatised
```
git clone --recursive https://github.com/eoli3n/dotfiles
cd dotfiles
git checkout <master|dev>
cd vagrant/<archlinx|debian|centos|freebsd>
vagrant up
```
# Test
- Launch virtualbox GUI, open VM
- Login in TTY
- Login : ``vagrant``
- Password : ``vagrant``
- ``startx``
# Clean after test
- Suppress Virtualbox VM
```
cd ~/dotfiles/vagrant/<archlinx|debian|centos|freebsd>
vagrant destroy
```
- Suppress Vagrant box
```
vagrant box list
vagrant box remove <box>
```

@ -16,16 +16,18 @@ Vagrant.configure("2") do |config|
ln -s /usr/local/bin/python2 /usr/bin/python
echo 'hostname="freebsd"' >> /etc/rc.conf
hostname freebsd
# DOTFILES DIR
mkdir -p /home/vagrant/dotfiles
SHELL
config.vm.synced_folder "../../", "/home/vagrant/dotfiles/", type: "rsync", rsync__exclude: [".git/", ".vagrant.d/"]
$script = <<-SCRIPT
# PREP
touch ~/.viminfo; rm ~/.viminfo
touch ~/.vimrc; rm ~/.vimrc
# EXEC
git clone --recursive https://github.com/eoli3n/dotfiles
cd dotfiles
git submodule update --init --recursive
./install.sh server
#CHANGE SH LINE : chsh -s /usr/local/bin/zsh -p ?? how to use crypt
SCRIPT