Browse Source

Some fixes from re-installing office terminals

pull/12/head
Zachary Seguin 6 years ago
parent
commit
14eecc3b71
  1. 3
      .gitignore
  2. 9
      distribute-ncmpcpp.yml
  3. 8
      files/ncmpcpp
  4. 3
      roles/common/tasks/main.yml
  5. 4
      roles/general-use-gui/tasks/main.yml
  6. 6
      roles/generate-hosts/tasks/main.yml
  7. 6
      update-hosts.yml

3
.gitignore vendored

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

9
distribute-ncmpcpp.yml

@ -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

@ -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

3
roles/common/tasks/main.yml

@ -9,6 +9,9 @@
- "deb 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)
package: update_cache=yes upgrade=safe

4
roles/general-use-gui/tasks/main.yml

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

6
roles/generate-hosts/tasks/main.yml

@ -2,12 +2,12 @@
- name: update hosts
connection: local
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
connection: local
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
copy: src=generate-hosts/hosts dest=/etc/hosts backup=yes
copy: src=generate-hosts-{{ ansible_hostname }}/hosts dest=/etc/hosts backup=yes

6
update-hosts.yml

@ -5,9 +5,9 @@
tasks:
- name: update hosts
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
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
copy: src=generate-hosts/hosts dest=/etc/hosts backup=yes
copy: src=generate-hosts-{{ ansible_hostname }}/hosts dest=/etc/hosts backup=yes

Loading…
Cancel
Save