ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Ansible role for GRAV

    IT Discussion
    ansible grav
    4
    10
    1.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • stacksofplatesS
      stacksofplates
      last edited by

      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:

      0_1519003662958_grav.png

      Emad RE 1 Reply Last reply Reply Quote 3
      • stacksofplatesS
        stacksofplates
        last edited by stacksofplates

        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
        
        1 Reply Last reply Reply Quote 0
        • stacksofplatesS
          stacksofplates
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • Emad RE
            Emad R @stacksofplates
            last edited by

            @stacksofplates

            More screenshots of GRAV plz if you still have it, like spam us like I do

            stacksofplatesS 1 Reply Last reply Reply Quote 0
            • stacksofplatesS
              stacksofplates @Emad R
              last edited by stacksofplates

              @emad-r said in Ansible role for GRAV:

              @stacksofplates

              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:

              https://getgrav.org/downloads/skeletons

              A 1 Reply Last reply Reply Quote 0
              • A
                Alex Sage @stacksofplates
                last edited by

                @stacksofplates said in Ansible role for GRAV:

                https://getgrav.org/downloads/skeletons

                From this link, it looks like a full CMS? I thought it was a wiki.

                stacksofplatesS 1 Reply Last reply Reply Quote 0
                • stacksofplatesS
                  stacksofplates
                  last edited by

                  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.

                  black3dynamiteB 1 Reply Last reply Reply Quote 0
                  • stacksofplatesS
                    stacksofplates @Alex Sage
                    last edited by

                    @aaronstuder said in Ansible role for GRAV:

                    @stacksofplates said in Ansible role for GRAV:

                    https://getgrav.org/downloads/skeletons

                    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.

                    1 Reply Last reply Reply Quote 1
                    • black3dynamiteB
                      black3dynamite @stacksofplates
                      last edited by

                      @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?

                      stacksofplatesS 1 Reply Last reply Reply Quote 0
                      • stacksofplatesS
                        stacksofplates @black3dynamite
                        last edited by

                        @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.

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post