Skip to content

Instantly share code, notes, and snippets.

@benhosmer
Created August 15, 2012 14:43
Show Gist options
  • Save benhosmer/3360708 to your computer and use it in GitHub Desktop.
Save benhosmer/3360708 to your computer and use it in GitHub Desktop.
A SALT .sls file to install Apache, PHP5, and MariaDB on Ubuntu
apache2:
pkg:
- installed
php5:
pkg:
- installed
mariadb-server-5.5:
cmd.run:
- name: sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
- unless: apt-key list | grep -q 0xcbcb082a1bb943db
file:
- append
- name: /etc/apt/sources.list
- text: deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu precise main
- skip_verify: True
pkg:
- installed
- refresh: True
@benhosmer
Copy link
Author

This should check if the repo is already there and not append it if it is. We also don't need to run apt-get update unless the repo wasn't there already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment