Ansible role for GRAV
-
I made a simple role to set up GRAV. Sadly, they hard code the version in the URL download so if it changes, it will have to change in the role as well. I could parse the page and look for the current version text, but they have the same text for the beta also. Oh well.
Here's your requirements.yml:
- src: https://gitlab.com/hooksie1/ansible-firewalld.git name: firewalld scm: git version: master - src: https://gitlab.com/hooksie1/ansible-httpd.git name: httpd scm: git version: master - src: https://gitlab.com/hooksie1/ansible-grav.git name: grav scm: git version: master
And here's a sample playbook:
--- - name: Set up GRAV hosts: grav user: vagrant become: true roles: - { role: firewalld, firewall_services: "http" } - { role: httpd, www_html_override: "All" } - { role: grav }
Just grab the roles with:
ansible-galaxy install -r requirements.yml -p <your role path>
Then run your playbook:
ansible-playbook grav.yml
Go to your URL and you'll have the create user page:
-
Here's a sample Vagrantfile for anyone who wants it (it's using the libvirt provider):
# -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| config.vm.define :httpd do |httpd| httpd.vm.box = "fedora/27-cloud-base" httpd.vm.hostname = "httpd.example.com" httpd.vm.provider :libvirt do |domain| domain.memory = 512 end end config.vm.provision "shell", inline: "sudo dnf install -y python" config.vm.provision "ansible" do |ansible| ansible.playbook = "grav.yml" ansible.groups = { "grav_servers" => ["grav"] } end end
-
It's only been tested on Fedora 27. I used the cloud image, and if you want to use that you can also leave out the firewall role. I stuck it in because I figured most people would be using regular Fedora 27 server.
-
More screenshots of GRAV plz if you still have it, like spam us like I do
-
@emad-r said in Ansible role for GRAV:
More screenshots of GRAV plz if you still have it, like spam us like I do
Oh it all depends on the theme you want. Some functions are dependent on the theme, others on plugins. It’s a flat file CMS with no database. Everything is defined in markdown or YAML.
This is the best place to see what it can look like:
-
@stacksofplates said in Ansible role for GRAV:
From this link, it looks like a full CMS? I thought it was a wiki.
-
I think the coolest thing about it is being a flat file setup, you can check the whole CMS into Git and do all of your edits and updates through configuration management.
-
@aaronstuder said in Ansible role for GRAV:
@stacksofplates said in Ansible role for GRAV:
From this link, it looks like a full CMS? I thought it was a wiki.
Right. It’s a full CMS. However you can do just Wiki functions using some themes.
-
@stacksofplates said in Ansible role for GRAV:
I think the coolest thing about it is being a flat file setup, you can check the whole CMS into Git and do all of your edits and updates through configuration management.
So I would just have create a new repo from within the root directory?
-
@black3dynamite said in Ansible role for GRAV:
@stacksofplates said in Ansible role for GRAV:
I think the coolest thing about it is being a flat file setup, you can check the whole CMS into Git and do all of your edits and updates through configuration management.
So I would just have create a new repo from within the root directory?
Well I was thinking more update the site, make page changes, etc on my local repo. Push changes up to my repo in Gitlab/Github whatever and then have a post-receive hook that pushes changes to the web server.