[meta] update server config
change
commit b9c9e1227568b80822595dcfe7e2e8d73828cd67
author Alpha Chen <alpha.chen@gmail.com>
date
parent 3a97e5bd
diff --git a/.ssh/config b/.ssh/config
index b6b727f4..9cd2fccc 100644
--- a/.ssh/config
+++ b/.ssh/config
@@ -9,7 +9,7 @@ Host *
   IdentityFile ~/.ssh/id_rsa
 
 Host kejadlen.net
-  IdentityFile ~/.ssh/prgmr_rsa
+  IdentityFile ~/.ssh/pressure_drop_rsa
 
 Host kejadlen.console.xen.prgmr.com
   IdentityFile ~/.ssh/prgmr_rsa
diff --git a/ansible/intro_example.yml b/ansible/intro_example.yml
deleted file mode 100644
index 87fbddfc..00000000
--- a/ansible/intro_example.yml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-# this is an annotated example of some features available in playbooks
-# it shows how to make sure packages are updated, how to make sure
-# services are running, and how to template files.  It also demos
-# change handlers that can restart things (or trigger other actions)
-# when resources change.  For more advanced examples, see example2.yml
-
-# on all hosts, run as the user root...
-
-- name: example play
-  hosts: all
-
-# could have also have done:
-#  remote_user: mdehaan
-#  sudo: yes
-
-  # make these variables available inside of templates
-  # for when we use the 'template' action/module later on...
-
-  vars:
-    http_port: 80
-    max_clients: 200
-
-  # define the tasks that are part of this play...
-
-  tasks:
-    - name: ping
-      ping:
diff --git a/ansible/server.yml b/ansible/server.yml
new file mode 100644
index 00000000..de3d8926
--- /dev/null
+++ b/ansible/server.yml
@@ -0,0 +1,22 @@
+---
+- name: Setup SSH key
+  hosts: servers
+  tasks:
+    - authorized_key:
+        user: alpha
+        state: present
+        key: "{{ lookup('file', '~/.ssh/pressure_drop_rsa.pub') }}"
+
+- name: Update apt
+  hosts: servers
+  tasks:
+    - apt: update_cache=yes
+      become: true
+    - apt: upgrade=dist
+      become: true
+
+- name: Setup ZNC
+  hosts: servers
+  tasks:
+    - apt: name=znc state=present
+      become: true