2021-11-14 19:07:46 +01:00

50 lines
926 B
YAML

---
- name: install software
package: name={{ install_software }} state=present update_cache=yes
- name: generate ssh key
openssh_keypair:
path: "/root/.ssh/id_rsa"
type: rsa
size: 2048
state: present
force: no
- name: read ssh key
command: "cat /root/.ssh/id_rsa.pub"
register: key
- name: show ssh public key
debug:
msg: "{{ key.stdout }}"
- name: checkout site
git:
repo: https://git.br0tkasten.de/br0tkasten/www.br0tkasten.de.git
dest: /srv/hugo
version: master
- name: deploy hugo init script
copy:
src: hugo.openrc
dest: /etc/init.d/hugo
mode: 0755
- name: enable hugo service
service:
name: hugo
state: started
enabled: yes
- name: deploy webhook init script
copy:
src: webhook.openrc
dest: /etc/init.d/webhook
mode: 0755
- name: start & enable webhook
service:
name: webhook
state: started
enabled: yes