---
title: 'Installing Grav with Ansible'
url: 'https://getgrav.org/forum/installation-hosting/installing-grav-with-ansible-t4001'
markdown: 'https://getgrav.org/forum/installation-hosting/installing-grav-with-ansible-t4001.md'
date: '2026-06-21'
description: "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"
---

[Installation & Hosting](https://getgrav.org/forum/installation-hosting)

#  Installing Grav with Ansible 

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

 [9 years ago](https://getgrav.org/forum/installation-hosting/installing-grav-with-ansible-t4001#post-18479 "Permalink") 

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' | ⚫ | ⚫ | ✅ | [❌](https://github.com/andywimmer/ansible-grav/issues/4) |
| CentOS 7.3.1611 | ⚫ | ✅ | ⚫ | ⚫ |
| Debian '8' | ⚫ | ⚫ | ✅ | ✅ |
| Debian 8.8 | ⚫ | ✅ | ⚫ | ⚫ |
| Debian 9.0 | ⚫ | ✅ | ✅ | ✅ |
| Fedora 25 | ⚫ | ✅ | ⚫ | [❌](https://github.com/andywimmer/ansible-grav/issues/2) |
| 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](https://getgrav.org/forum/installation-hosting/installing-grav-with-ansible-t4001#post-18498 "Permalink") 

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](https://getgrav.org/forum/installation-hosting/installing-grav-with-ansible-t4001#post-18525 "Permalink") 

Playbook now supports Debian and Fedora. Thx @wfsaxton!

 [9 years ago](https://getgrav.org/forum/installation-hosting/installing-grav-with-ansible-t4001#post-18626 "Permalink") 

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](https://getgrav.org/forum/installation-hosting/installing-grav-with-ansible-t4001#post-18641 "Permalink") 

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

 👍 2 

 [9 years ago](https://getgrav.org/forum/installation-hosting/installing-grav-with-ansible-t4001#post-18697 "Permalink") 

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](http://gantry.org/) 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](https://getgrav.org/forum/installation-hosting/installing-grav-with-ansible-t4001#post-18726 "Permalink") 

Thanks Andy! I still need to check this out!

 👍 1 

 [9 years ago](https://getgrav.org/forum/installation-hosting/installing-grav-with-ansible-t4001#post-19379 "Permalink") 

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

[Log in](https://getgrav.org/login?return=%2Fforum%2Finstallation-hosting%2Finstalling-grav-with-ansible-t4001) to reply.

###  Suggested topics

 | Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| [0 Plugins in gpm index](https://getgrav.org/forum/installation-hosting/0-plugins-in-gpm-index-t9505)    [Installation & Hosting](https://getgrav.org/forum/installation-hosting) · by vollstock, 1 week ago |  | 3 | 121 | [1 week ago](https://getgrav.org/forum/installation-hosting/0-plugins-in-gpm-index-t9505 "by pamtbaau") |
| [Docker Image - dsavell/grav](https://getgrav.org/forum/installation-hosting/docker-image-dsavell-grav-t9174)    [Installation & Hosting](https://getgrav.org/forum/installation-hosting) · by David, 7 years ago |  | 3 | 3422 | [3 weeks ago](https://getgrav.org/forum/installation-hosting/docker-image-dsavell-grav-t9174 "by Andy Miller") |
| [Cache directory filling up disk on server](https://getgrav.org/forum/installation-hosting/cache-directory-filling-up-disk-on-server-t9482)    [Installation & Hosting](https://getgrav.org/forum/installation-hosting) · by David Meissner, 3 weeks ago |  | 3 | 275 | [3 weeks ago](https://getgrav.org/forum/installation-hosting/cache-directory-filling-up-disk-on-server-t9482 "by David Meissner") |
| [Optional PHP modules](https://getgrav.org/forum/installation-hosting/optional-php-modules-t9481)    [Installation & Hosting](https://getgrav.org/forum/installation-hosting) · by David Meissner, 3 weeks ago |  | 0 | 188 | [3 weeks ago](https://getgrav.org/forum/installation-hosting/optional-php-modules-t9481 "by David Meissner") |
| [Need help moving Grav 1.7 site to a new server](https://getgrav.org/forum/installation-hosting/need-help-moving-grav-1-7-site-to-a-new-server-t9472)    [Installation & Hosting](https://getgrav.org/forum/installation-hosting) · by Anthony J Cervo, 4 weeks ago |  | 3 | 261 | [4 weeks ago](https://getgrav.org/forum/installation-hosting/need-help-moving-grav-1-7-site-to-a-new-server-t9472 "by pamtbaau") |
