Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize pkgrepo usage #250

Merged
merged 2 commits into from Mar 22, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Use pkgrepo for Salt

This is part of a patch series to standardize our Salt installations.
  • Loading branch information
aneeshusa committed Mar 12, 2016
commit 483d9a12b2ad7c8e66f23ed5c57dfc7d8fc18eb2
@@ -11,7 +11,7 @@ install_salt () {
# Don't autostart services
printf '#!/bin/sh\nexit 101\n' | sudo install -m 755 /dev/stdin /usr/sbin/policy-rc.d
curl https://repo.saltstack.com/apt/ubuntu/14.04/amd64/archive/2015.5.8/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
printf 'deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/archive/2015.5.8 trusty main\n' | sudo tee -a /etc/apt/sources.list >/dev/null
printf 'deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/archive/2015.5.8 trusty main\n' | sudo tee /etc/apt/sources.list.d/saltstack.list >/dev/null
sudo apt-get -y update
sudo apt-get -y install salt-minion=2015.5.8+ds-1
elif [ "${OS_NAME}" = "osx" ]; then
@@ -0,0 +1,16 @@
{% from tpldir ~ '/map.jinja' import salt %}
{% if grains['os'] == 'Ubuntu' %}
salt:
pkgrepo.managed:
- name: 'deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/archive/{{ salt.version }} trusty main'
- file: /etc/apt/sources.list.d/saltstack.list
- key_url: https://repo.saltstack.com/apt/ubuntu/14.04/amd64/archive/{{ salt.version }}/SALTSTACK_GPG_KEY.pub
/etc/apt/sources.list.d/saltstack.list:
file.exists:
- require:
- pkgrepo: salt
- require_in:
- file: /etc/apt/sources.list.d
{% endif %}
@@ -0,0 +1,10 @@
{%
set salt = salt.grains.filter_by({
'defaults': {
'version': '2015.5.8'
},
},
base='defaults',
merge=salt.pillar.get('salt', {})
)
%}
@@ -4,6 +4,7 @@ base:
'*':
- common
- servo-dependencies
- salt.common

'os:Ubuntu':
- match: grain
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.