Skip to content

Instantly share code, notes, and snippets.

@rdhyee
Created April 12, 2014 01:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdhyee/10513691 to your computer and use it in GitHub Desktop.
Save rdhyee/10513691 to your computer and use it in GitHub Desktop.
ansible playbook for installing QGIS on Ubuntu 12.04LTS
- hosts: vagrant_local
sudo: true
pre_tasks:
- name: check apt last update
stat: path=/var/cache/apt
register: apt_cache_stat
- name: update apt if needed
apt: update_cache=yes
when: ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > 60*60*12
tasks:
- name: do apt-get update --fix-missing
command: apt-get update --fix-missing
- name: install python-software-properties
apt: pkg=python-software-properties state=present
- name: add ubuntugis-unstable
apt_repository: repo='ppa:ubuntugis/ubuntugis-unstable' state=present update_cache=yes
- name: install base packages
apt: pkg={{item}} state=present update_cache=yes cache_valid_time=604800
with_items:
- qgis
- hosts: localhost
connection: local
gather_facts: False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment