Commit 9e1ab03

bryfry <bryon.fryer@gmail.com>
2018-02-19 14:34:23
updates for consolefont and home
1 parent 6760f1f
tasks/battery.yml
@@ -0,0 +1,14 @@
+---
+# battery.yml tasks
+
+- name: fetch spark & battery
+  get_url:
+    url: "{{ item }}"
+    dest: /usr/local/bin
+    mode: 0755
+  become: yes
+  tags: battery
+  with_items:
+  - https://raw.githubusercontent.com/goles/battery/master/battery
+  - https://raw.githubusercontent.com/holman/spark/master/spark 
+
tasks/consolefont.yml
@@ -0,0 +1,16 @@
+---
+# consolefont.yml tasks
+
+- name: consolefont - terminus with powerline gliphs
+  get_url:
+    url: "{{ item }}"
+    dest: /usr/share/consolefonts/
+  become: True
+  with_items:
+  - "https://raw.githubusercontent.com/powerline/fonts/master/Terminus/PSF/{{ terminus_font_file }}"
+
+- name: consolefont - console-setup file (requires reboot to reload)
+  template: 
+    src: templates/console-setup.j2
+    dest: /etc/default/console-setup
+  become: True
tasks/home.yml
@@ -0,0 +1,42 @@
+---
+# home.yml tasks
+
+- name: home - check git dir existance
+  stat: 
+    path: "{{ home_dir }}"
+  register: home_git_dir
+
+- name: home - git clone (only if absent, touch yubikey for ssh key unlock)
+  git:
+    repo: git@github.com:bryfry/home.git
+    dest: "{{ home_dir }}"
+  when: not home_git_dir.stat.exists
+
+- name: home - symbolic links
+  file:
+    src: "{{ home_dir }}/{{ item }}" 
+    dest: "{{ ansible_env.HOME }}/.{{ item }}"
+    state: link
+    force: yes
+  tags: home
+  with_items:
+  - vimrc
+  - tmux.conf
+  - tmux.statusbar.conf
+  # REMOVE < NO X >
+  #- Xmodmap
+  #- Xmodma
+  #- Xmodmaliases
+  #- Xmodmae
+  #- Xmodmarc 
+  #- Xmodmac
+  #- Xmodmaonf
+  #- Xmodmatatusbar.conf
+
+- name: home - symbolic links (ssh config)
+  file:
+    src: "{{ home_dir }}/ssh-config" 
+    dest: "{{ ansible_env.HOME }}/.ssh/config"
+    state: link
+    force: yes
+  tags: home
templates/console-setup.j2
@@ -0,0 +1,10 @@
+# CONFIGURATION FILE FOR SETUPCON
+
+# Consult the console-setup(5) manual page.
+
+ACTIVE_CONSOLES="/dev/tty[1-6]"
+
+CHARMAP="UTF-8"
+
+VIDEOMODE=
+FONT={{ terminus_font_file }}
main.yml
@@ -13,6 +13,7 @@
     golang_tar: https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz
     scp_url: https://github.com/adobe-fonts/source-code-pro/archive/2.030R-ro/1.050R-it.zip  
     scp_dir: source-code-pro-2.030R-ro-1.050R-it
+    terminus_font_file: "ter-powerline-v12n.psf.gz"
     
 
   tasks:  
@@ -47,7 +48,7 @@
     # Ansible
     - python3 
     - python3-pip
-    # wireless
+    # Wireless
     - firmware-iwlwifi # reboot is easist way to enable
     - iw
     - wpasupplicant
@@ -68,12 +69,13 @@
       #- include: tasks/st.yml
       #- include: tasks/dwm.yml
       #- include: tasks/slock.yml
-      #- include: tasks/home.yml
+  - include: tasks/home.yml
+  - include: tasks/battery.yml
+  - include: tasks/consolefont.yml
       #- include: tasks/xorg.yml
       #- include: tasks/systemd.yml
       #- include: tasks/lastpass.yml
       #- include: tasks/sourcecodepro.yml
-      #- include: tasks/battery.yml
       #- include: tasks/golang.yml
       #- include: tasks/git.yml
 
README.md
@@ -41,7 +41,11 @@ An ansible playbook for setting up Debian Sid (console only) on a Dell Chromeboo
   * `sudo wpa_supplicant -B -i wlp1s0 -c /root/<SSID>.conf`
   * `sudo dhclient -i wlp1s0`
 
-#### Neat
+## Running it
+
+  * `ansible-playbook -i hosts main.yml`
+
+#### Neat stuff
 
   * min backlight: `sudo tee /sys/class/backlight/intel_backlight/brightness <<< "1"`
   * max backlight: ``sudo tee /sys/class/backlight/intel_backlight/brightness <<< `cat /sys/class/backlight/intel_backlight/max_brightness` ``