Some fixes from re-installing office terminals

This commit is contained in:
Zachary Seguin 2016-07-06 16:41:16 -04:00
parent 019a4a2763
commit 14eecc3b71
7 changed files with 31 additions and 8 deletions

3
.gitignore vendored
View File

@ -2,4 +2,5 @@ logs/
*.log *.log
*.pyc *.pyc
generate-hosts/ generate-hosts/
*.retry generate-hosts-*/
*.retry

9
distribute-ncmpcpp.yml Normal file
View File

@ -0,0 +1,9 @@
---
- hosts: office
become: yes
become_method: sudo
tasks:
- name: Copy ncmpcpp
copy: src={{ item.src }} dest={{ item.dest }} backup=no mode=0755
with_items:
- { src: 'files/ncmpcpp', dest: '/usr/local/bin/ncmpcpp' }

8
files/ncmpcpp Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
if [[ `hostname -f` = nullsleep.csclub.uwaterloo.ca ]]; then
MPD_HOST="/var/run/mpd/socket" /usr/bin/ncmpcpp "$@"
else
ssh nullsleep.csclub.uwaterloo.ca -t ncmpcpp "$@"
fi

View File

@ -9,6 +9,9 @@
- "deb http://debian.csclub.uwaterloo.ca/ {{ ansible_distribution_release }} main" - "deb http://debian.csclub.uwaterloo.ca/ {{ ansible_distribution_release }} main"
- "deb-src http://debian.csclub.uwaterloo.ca/ {{ ansible_distribution_release }} main" - "deb-src http://debian.csclub.uwaterloo.ca/ {{ ansible_distribution_release }} main"
- name: Correct permisions on debian_csclub_uwaterloo_ca.list
file: path=/etc/apt/sources.list.d/debian_csclub_uwaterloo_ca.list mode=0644
- name: Update apt and packages (if just installed unlikely) - name: Update apt and packages (if just installed unlikely)
package: update_cache=yes upgrade=safe package: update_cache=yes upgrade=safe

View File

@ -107,6 +107,8 @@
apt: name={{ item }} state=latest apt: name={{ item }} state=latest
with_items: with_items:
- xmobar - xmobar
- i3blocks
- dzen2
- name: Install lockers - name: Install lockers
apt: name={{ item }} state=latest apt: name={{ item }} state=latest
@ -253,4 +255,4 @@
- name: Install misc tools - name: Install misc tools
apt: name={{ item }} state=latest apt: name={{ item }} state=latest
with_items: with_items:
- workrave - workrave

View File

@ -2,12 +2,12 @@
- name: update hosts - name: update hosts
connection: local connection: local
become: no become: no
git: repo=~git/public/hosts.git dest=generate-hosts git: repo=~git/public/hosts.git dest=generate-hosts-{{ ansible_hostname }}
- name: generate hosts file - name: generate hosts file
connection: local connection: local
become: no become: no
shell: generate-hosts/generate-hosts.py < generate-hosts/hosts.in > generate-hosts/hosts shell: generate-hosts-{{ ansible_hostname }}/generate-hosts.py < generate-hosts-{{ ansible_hostname }}/hosts.in > generate-hosts-{{ ansible_hostname }}/hosts
- name: copy hosts file - name: copy hosts file
copy: src=generate-hosts/hosts dest=/etc/hosts backup=yes copy: src=generate-hosts-{{ ansible_hostname }}/hosts dest=/etc/hosts backup=yes

View File

@ -5,9 +5,9 @@
tasks: tasks:
- name: update hosts - name: update hosts
connection: local connection: local
git: repo=~git/public/hosts.git dest=generate-hosts git: repo=~git/public/hosts.git dest=generate-hosts-{{ ansible_hostname }}
- name: generate hosts file - name: generate hosts file
connection: local connection: local
shell: generate-hosts/generate-hosts.py < generate-hosts/hosts.in > generate-hosts/hosts shell: generate-hosts-{{ ansible_hostname }}/generate-hosts.py < generate-hosts-{{ ansible_hostname }}/hosts.in > generate-hosts-{{ ansible_hostname }}/hosts
- name: copy hosts file - name: copy hosts file
copy: src=generate-hosts/hosts dest=/etc/hosts backup=yes copy: src=generate-hosts-{{ ansible_hostname }}/hosts dest=/etc/hosts backup=yes