[meta] server setup, mostly vnc

pull/28/head
Alpha Chen 8 years ago
parent 2f686a0fd0
commit 943825bf75

@ -0,0 +1,9 @@
[Unit]
Description=ZNC, an advanced IRC bouncer
After=network-online.target
[Service]
ExecStart=/usr/bin/znc -f
[Install]
WantedBy=multi-user.target

@ -0,0 +1,23 @@
- authorized_key:
user: alpha
state: present
key: "{{ lookup('file', '~/.ssh/pressure_drop_rsa.pub') }}"
- name: apt update cache
apt: update_cache=yes
become: true
- name: apt upgrade dist
apt: upgrade=dist
become: true
- name: install/upgrade packages
apt: name={{ item }} state=present
become: true
with_items:
- libpam-systemd
- vim
- file:
path: ~/.config/systemd/user
state: directory
- include: znc.yml

@ -0,0 +1,24 @@
- name: install/upgrade znc
apt: name=znc state=latest
become: true
- name: znc config
copy:
src: znc/{{ item }}
dest: ~/.znc/{{ item | splitext | first }}
with_items:
- configs/znc.conf.private
- znc.pem.private
- name: znc systemd
copy:
src: znc/znc.service
dest: ~/.config/systemd/user/znc.service
- name: restart znc
systemd:
name: znc
daemon_reload: yes
enabled: yes
state: restarted
user: yes

@ -1,22 +1,4 @@
--- ---
- name: Setup SSH key - hosts: servers
hosts: servers roles:
tasks: - role: server
- 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

Loading…
Cancel
Save