<commit_before>{% set os = salt['grains.get']('os', '') %}
{% set distro = salt['grains.get']('oscodename', '')  %}
{% set pkgs = ['salt-master', 'salt-minion', 'salt-api', 'salt-cloud', 'salt-ssh', 'salt-syndic'] %}
{% set testing = pillar.get('testing', 'False') %}

# Add testing repos for each Debian Distro
{% if testing == 'True' and os =='Debian' %}

# Get the GPG key for Debian Packages
debian:
  cmd.run:
    - name: wget -O - http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key|apt-key add -
    - require_in:
      - file: source_prep

# Add SaltStack's Testing PPA & Debian Backports
source_prep:
  file.append:
    - name: /etc/apt/sources.list
    {% if distro == 'squeeze' %}
    - text: |
        ####################
        # Enable SaltStack's package testing repository
        deb http://debian.saltstack.com/debian squeeze-testing main
        ####################
        # Enable Debian's Backports repository
        deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free
    {% else %}
    - text: |
        ####################
        # Enable SaltStack's package testing repository
        deb http://debian.saltstack.com/debian {{ distro }}-testing main
    {% endif %}

{% else %}

# TODO: Figure out why saltstack/testing doesn't work anymore
# TODO: And implement new Ubuntu testing state if something else is needed
# Add saltstack/testing repo for Ubuntu releases
#add_apt_repo:
#  cmd.run:
#    - name: add-apt-repository ppa:saltstack/testing

add_apt_repo:
  cmd.run:
    - name: add-apt-repository ppa:saltstack/salt

{% endif %}

# Update Mirrors
apt_update:
  cmd.run:
    - name: apt-get update -y

# Install salt packages
{% for pkg in pkgs %}
{{ pkg }}:
  cmd.run:
    - name: apt-get -y install {{ pkg }}
{% endfor %}
<commit_msg>Add python-software-properties installation for Ubuntu 12<commit_after>{% set os = salt['grains.get']('os', '') %}
{% set distro = salt['grains.get']('oscodename', '')  %}
{% set pkgs = ['salt-master', 'salt-minion', 'salt-api', 'salt-cloud', 'salt-ssh', 'salt-syndic'] %}
{% set testing = pillar.get('testing', 'False') %}

# Add testing repos for each Debian Distro
{% if testing == 'True' and os =='Debian' %}

# Get the GPG key for Debian Packages
debian:
  cmd.run:
    - name: wget -O - http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key|apt-key add -
    - require_in:
      - file: source_prep

# Add SaltStack's Testing PPA & Debian Backports
source_prep:
  file.append:
    - name: /etc/apt/sources.list
    {% if distro == 'squeeze' %}
    - text: |
        ####################
        # Enable SaltStack's package testing repository
        deb http://debian.saltstack.com/debian squeeze-testing main
        ####################
        # Enable Debian's Backports repository
        deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free
    {% else %}
    - text: |
        ####################
        # Enable SaltStack's package testing repository
        deb http://debian.saltstack.com/debian {{ distro }}-testing main
    {% endif %}

{% else %}

# TODO: Figure out why saltstack/testing doesn't work anymore
# TODO: And implement new Ubuntu testing state if something else is needed
# Add saltstack/testing repo for Ubuntu releases
#add_apt_repo:
#  cmd.run:
#    - name: add-apt-repository ppa:saltstack/testing

{% if '12' in salt['grains.get']('osrelease_info', '') %}
add_python_software_properties:
  cmd.run:
    - name: apt-get -y install python-software-properties

{% endif %}

add_apt_repo:
  cmd.run:
    - name: add-apt-repository ppa:saltstack/salt

{% endif %}

# Update Mirrors
apt_update:
  cmd.run:
    - name: apt-get update -y

# Install salt packages
{% for pkg in pkgs %}
{{ pkg }}:
  cmd.run:
    - name: apt-get -y install {{ pkg }}
{% endfor %}

{'fraction_non_alphanumeric': 0.1718952553798289, 'fraction_numerical': 0.0010370754472387865, 'mean_word_length': 3.1528525296017222, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6055590', 'n_tokens_mistral': 1379, 'n_tokens_neox': 1211, 'n_words': 329}