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 all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -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
@@ -3,6 +3,10 @@ longview:
- name: 'deb http://apt-longview.linode.com/ trusty main'
- file: /etc/apt/sources.list.d/longview.list
- key_url: https://apt-longview.linode.com/linode.gpg

/etc/apt/sources.list.d/longview.list:
file.exists:
- require:
- pkgrepo: longview
- require_in:
- file: /etc/apt/sources.list.d

@@ -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', {})
)
%}
@@ -64,21 +64,26 @@ homebrew-link-openssl:
- require:
- pkg: servo-dependencies
{% else %}
FIX enable multiverse:
pkgrepo.absent:
- name: deb http://archive.ubuntu.com/ubuntu trusty multiverse
enable multiverse:
multiverse:
pkgrepo.managed:
- name: deb http://archive.ubuntu.com/ubuntu trusty multiverse
- name: 'deb http://archive.ubuntu.com/ubuntu trusty multiverse'
- file: /etc/apt/sources.list.d/multiverse.list
- require_in:
- pkg: ttf-mscorefonts-installer
/etc/apt/sources.list.d/multiverse.list:
file.exists:
- require:
- pkgrepo: multiverse
- require_in:
- file: /etc/apt/sources.list.d
ttf-mscorefonts-installer:
debconf.set:
- name: ttf-mscorefonts-installer
- data: { 'msttcorefonts/accepted-mscorefonts-eula': { 'type': 'boolean', 'value': True } }
pkg.installed:
- pkgs:
- ttf-mscorefonts-installer
- requires:
- require:
- debconf: ttf-mscorefonts-installer
{% endif %}
@@ -4,6 +4,7 @@ base:
'*':
- common
- servo-dependencies
- salt.common

'os:Ubuntu':
- match: grain
@@ -7,14 +7,16 @@
- mode: 755
- source: salt://{{ tpldir }}/files/policy-rc.d

# Workaround for https://github.com/saltstack/salt/issues/26605
# Clean the directory first, and require it in all pkgrepo states
# which add repositories to the sources.list.d folder (instead of
# the main /etc/apt/sources.list file)
# Workaround for https://github.com/saltstack/salt/issues/26605:
# For each pkgrepo state which adds any repositories to the sources.list.d
# folder (instead of the main /etc/apt/sources.list file), create an extra,
# no-op file.exists state which requires the pkgrepo state and require_ins
# this state
/etc/apt/sources.list.d:
file.directory:
- user: root
- group: root
- file_mode: 644
- dir_mode: 755
- recurse:
- user
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.