aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Isom <kyle@imap.cc>2017-09-08 21:04:35 -0700
committerKyle Isom <kyle@imap.cc>2017-09-08 21:04:35 -0700
commit5519dca87bd459cf824935bd89e626eafffb0754 (patch)
treeb74f4717e48774209179d4d0f53d50aa4ef3d98a
parentf312c08e6def327bc7481d8ea277c78a60fea860 (diff)
downloadansible-5519dca87bd459cf824935bd89e626eafffb0754.tar.gz
ansible-5519dca87bd459cf824935bd89e626eafffb0754.tar.bz2
ansible-5519dca87bd459cf824935bd89e626eafffb0754.zip
Update for new model of netbook.
1. The N22 has an actual keyboard. 2. The firmware-nonfree installer is now based on stretch.
-rwxr-xr-xbin/bootstrap.sh11
-rw-r--r--roles/laptop/files/keyboard2
-rw-r--r--roles/laptop/files/syncthing.service18
-rw-r--r--roles/laptop/tasks/main.yaml15
4 files changed, 35 insertions, 11 deletions
diff --git a/bin/bootstrap.sh b/bin/bootstrap.sh
index fbff398..a607172 100755
--- a/bin/bootstrap.sh
+++ b/bin/bootstrap.sh
@@ -12,16 +12,7 @@ fi
echo "[+] adding apt-transport-https"
apt-get -y update
-apt-get -y install apt-transport-https
-
-# workaround: the non-free firmware installer, which is needed for the Chromebook
-# hardware, is still on jessie.
-echo "[+] switching to stretch"
-echo "deb https://mirrors.kernel.org/debian/ stretch main" | tee /etc/apt/sources.list
-echo "deb-src https://mirrors.kernel.org/debian/ stretch main" | tee -a /etc/apt/sources.list
-apt-get -y update
-apt-get -y dist-upgrade
-apt-get -y install ansible
+apt-get -y install apt-transport-https ansible sudo
echo "[+] switching to unstable."
echo "deb https://mirrors.kernel.org/debian/ unstable main" | tee /etc/apt/sources.list
diff --git a/roles/laptop/files/keyboard b/roles/laptop/files/keyboard
index e416824..1636b7c 100644
--- a/roles/laptop/files/keyboard
+++ b/roles/laptop/files/keyboard
@@ -4,6 +4,6 @@
XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
-XKBOPTIONS="compose:ralt,ctrl:swap_lwin_lctl"
+XKBOPTIONS="compose:ralt,ctrl:swap_caps"
BACKSPACE="guess"
diff --git a/roles/laptop/files/syncthing.service b/roles/laptop/files/syncthing.service
new file mode 100644
index 0000000..129558b
--- /dev/null
+++ b/roles/laptop/files/syncthing.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=syncthing file synchronisation
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/syncthing
+SyslogIdentifier=syncthing
+StandardOutput=syslog
+StandardError=inherit
+User=kyle
+Group=kyle
+RestartSec=60
+Restart=always
+WorkingDirectory=/home/kyle/
+
+[Install]
+WantedBy=default.target
+
diff --git a/roles/laptop/tasks/main.yaml b/roles/laptop/tasks/main.yaml
index e6122ef..a939a29 100644
--- a/roles/laptop/tasks/main.yaml
+++ b/roles/laptop/tasks/main.yaml
@@ -5,6 +5,8 @@
name: "{{item}}"
state: present
with_items:
+ - acpi
+ - acpitool
- alsa-tools
- alsa-utils
- cmus
@@ -52,6 +54,14 @@
when: keyboard.changed
command: udevadm trigger --subsystem-match=input --action=change
+- name: setup syncthing service
+ become: true
+ copy:
+ src: syncthing.service
+ dest: /etc/systemd/system/syncthing.service
+ owner: root
+ register: syncthing_unit
+
- name: ensure syncthing is running
become: true
service:
@@ -59,6 +69,11 @@
state: started
enabled: yes
+- name: trigger daemon-reload to pick up syncthing unit changes
+ become: true
+ when: syncthing_unit.changed
+ command: systemctl daemon-reload
+
- name: copy laptop local startup script
become: true
copy: