Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Installation & Hosting

Installing Grav with Ansible

Started by NOT Andy Miller 9 years ago · 7 replies · 1578 views
9 years ago

I decided to learn Ansible today and here's what I came up with after a few short hours of testing. Note it's only my first day, so I'm sure improvements can be made - I already have several in mind. Comments are definitely welcome. So far I've tested and verified with the server scenarios listed in the QA section of the readme.

https://github.com/andywimmer/ansible-grav

If you're unfamiliar, Ansible is used to automate the setup of freshly-provisioned servers. Once you provision a server with your hosting company, this 'playbook' will install NGINX, PHP7 and Grav (with a few other things) in just minutes. All you need to do is configure your DNS to point to your server and you'll (hopefully) be good-to-go!

Note I created this playbook mainly as a learning exercise, though I will improve/maintain it based on my own needs and any feedback received. If it helps someone install Grav on their server that's a plus 😃

update-20170710: did a major overhaul of the playbook for improved efficiency, along with adding support for Amazon Linux and CentOS.

Current compatibility matrix: AWS DigitalOcean Google Cloud Vultr
Amazon Linux 2017.03.1
CentOS '7'
CentOS 7.3.1611
Debian '8'
Debian 8.8
Debian 9.0
Fedora 25
Ubuntu 16.04
Ubuntu 16.04.2
Ubuntu 16.10
Ubuntu 17.04

Note I am not affiliated with any entities other than my own github links

👍 5
last edited 07/23/17 by NOT Andy Miller
9 years ago

Talk about great timing. I was trying to get https://github.com/afonsoduarte/ansible-grav working, but it seems like its broken in the latest version of Ansible.

Then I tried porting trellis myself...and failed miserably.

So I gave up and googled "ansible grav" again to see what else was out there. This came up. Will definitely give it a try.

9 years ago

Playbook now supports Debian and Fedora. Thx @wfsaxton!

9 years ago

I acquired a Google Cloud free trial and updated the playbook based on my QA. Updated compatibility matrix appears in the ^^first post^^

9 years ago

playbook has been updated to latest grav-admin release 1.3.0 😎

👍 2
9 years ago

Hello again. I don't intend to 'bump' this topic - sorry - I only post meaningful updates.

Anyway, I have updated the playbook to the latest version of Grav 1.3.1

I was also requested to create a playbook which installs the Gantry 5 Helium Skeleton. Well, instead of creating a whole new playbook I just created a 'gantry' branch of the repo with the gantry-specific code. Until I learn more Ansible (have been busy lately) this seems like the easiest way to do it, as the source links are hardcoded into the Ansible plays currently.

Eventually I would like to be able to offer all of the skeletons via this playbook but I must find a more elegant solution before proceeding down that road. Cheers!

👍 1
9 years ago

Thanks Andy! I still need to check this out!

👍 1
9 years ago

This looks great. I'm really interested to see if Trellis type Ansible deploys can be made to work with Grav.

Suggested topics

Topic Participants Replies Views Activity
Installation & Hosting · by antoinep, 10 hours ago
5 59 5 hours ago
Installation & Hosting · by Jürgen Dietrich, 7 months ago
0 60 7 months ago
Installation & Hosting · by rappluk, 8 months ago
0 61 8 months ago
Installation & Hosting · by N, 12 months ago
3 71 12 months ago
Installation & Hosting · by Youle, 1 year ago
1 60 1 year ago