1.0
This commit is contained in:
parent
ca09fdb449
commit
356870d7f3
|
@ -18,6 +18,8 @@ If you don't provide your own already-built site (with `cstate_repo` in `default
|
|||
|
||||
Once done, you can create issues files inside the `share/content/issues/` folder on your host. Then use `ansible-playbook -b Playbooks/cstate.yml --tags generate` to build those page in the `public/` directory.
|
||||
|
||||
To update cstate just include `--tags update` to your playbook.
|
||||
|
||||
## Issue with vagrant
|
||||
You may have to add `sendfile off;` to your Nginx config when using the role with Vagrant and a shared folder. See [info](https://www.vagrantup.com/docs/synced-folders/virtualbox)
|
||||
|
||||
|
|
|
@ -16,6 +16,6 @@ Vagrant.configure("2") do |config|
|
|||
cstate.vm.network "forwarded_port", guest: 443, host: 4444, host_ip: "192.168.33.20"
|
||||
cstate.vm.network "forwarded_port", guest: 8080, host: 8081, host_ip: "192.168.33.20"
|
||||
cstate.vm.network "private_network", ip: "192.168.33.20"
|
||||
cstate.vm.synced_folder "share", "/var/www/cstate", owner: "www-data", group: "www-data"
|
||||
# cstate.vm.synced_folder "share", "/var/www/cstate", owner: "www-data", group: "www-data"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
---
|
||||
|
||||
cstate_update: 'no' # 'yes' to update your own built repo with latest cstate
|
||||
|
||||
cstate_extra_files_path: '../files' # needed if using a logo from somwhere else than the role 'files' folder.
|
||||
|
||||
#Vars to clone custom content repository
|
||||
cstate_content_init: 'false'
|
||||
cstate_content_repo: 'https://example.com'
|
||||
|
||||
cstate_apt:
|
||||
- hugo
|
||||
- git
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
---
|
||||
|
||||
- name: '[GENERATE] - Update content git repo'
|
||||
git:
|
||||
repo: "{{ cstate_content_repo }}"
|
||||
dest: "{{ cstate_dir }}/content"
|
||||
become: yes
|
||||
become_user: "{{ cstate_username }}"
|
||||
when: cstate_content_init is defined and cstate_content_init == 'true'
|
||||
|
||||
- name: "[GENERATE] - Generate the public folder and files"
|
||||
shell: hugo
|
||||
args:
|
||||
chdir: '{{ cstate_dir }}'
|
||||
become: yes
|
||||
become_user: '{{ cstate_username }}'
|
||||
|
|
|
@ -5,4 +5,20 @@
|
|||
repo: "{{ cstate_repo }}"
|
||||
dest: "{{ cstate_dir }}"
|
||||
force: yes
|
||||
update: yes
|
||||
update: yes
|
||||
become: yes
|
||||
become_user: "{{ cstate_username }}"
|
||||
|
||||
- name: '[GIT] - Initiate content repo'
|
||||
file:
|
||||
path: '{{ cstate_dir }}/content'
|
||||
state: 'absent'
|
||||
when: cstate_content_init is defined and cstate_content_init == 'true'
|
||||
|
||||
- name: '[GIT] - Clone content git repo'
|
||||
git:
|
||||
repo: "{{ cstate_content_repo }}"
|
||||
dest: "{{ cstate_dir }}/content"
|
||||
become: yes
|
||||
become_user: "{{ cstate_username }}"
|
||||
when: cstate_content_init is defined and cstate_content_init == 'true'
|
||||
|
|
|
@ -15,4 +15,6 @@
|
|||
|
||||
- name: Update
|
||||
include: update.yml
|
||||
when: cstate_update == 'yes' and cstate_public_repo|length > 0
|
||||
tags:
|
||||
- update
|
||||
- never
|
||||
|
|
Loading…
Reference in New Issue