-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.yml
More file actions
36 lines (34 loc) · 959 Bytes
/
setup.yml
File metadata and controls
36 lines (34 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
- hosts : droplet
remote_user: "{{remote_user}}"
become: yes
tasks:
#- name: install golang
# package:
# name: golang-go
# state: present
- name: Create StaticSite directory
file:
path: /root/StaticSite
state: directory
- name: Copy hugo server's service file
template:
src: hugoserver.service
dest: /etc/systemd/system
mode: 0644
- name: pull website content from github
git:
repo: "{{repo}}"
dest: /root/StaticSite
update: yes
version: "master"
- name: download hugo source code
get_url:
url: https://github.com/gohugoio/hugo/releases/download/v0.55.6/hugo_0.55.6_Linux-64bit.deb
dest: /root/
- name: Install hugo
shell: dpkg -i hugo*.deb
args:
chdir: /root/
- name: Run hugo server
systemd: name=hugoserver state=restarted enabled=yes daemon_reload=yes