owncloud-client:
    pkgrepo.managed:
        - humanname: ownCloud desktop repo
        # Cannot use https since it redirects to non-https repos
        - name: deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_{{ grains.osmajorrelease }}.0/ /
        # The key varies with os version, thus download dynamically instead of pinning in the state
        - key_url: https://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_{{ grains.osmajorrelease }}.0/Release.key
        - require:
            - pkg: owncloud-client-deps

    pkg.installed:
        - name: owncloud-client
        - require:
            - pkgrepo: owncloud-client

owncloud-client:
    pkgrepo.managed:
        - humanname: ownCloud desktop repo
        # Cannot use https since it redirects to non-https repos
        - name: deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_{{ grains.osmajorrelease }}.0/ /
        # The key varies with os version, thus download dynamically instead of pinning in the state
        - key_url: https://download.opensuse.org/repositories/isv:ownCloud:desktop/Debian_{{ grains.osmajorrelease }}.0/Release.key
        - require:
            - pkg: owncloud-client-deps

    pkg.installed:
        - name: owncloud-client
        - require:
            - pkgrepo: owncloud-client

Revert "Try a non-redirecting owncloud repo key_url"
Revert "Try a non-redirecting owncloud repo key_url"

This reverts commit 11d718570797f7f05229414208bab9807b266f15.

Turned out this wasn't the problem, but the key not being updated
without the repo being removed.

thusoy/salt-states,thusoy/salt-states,thusoy/salt-states,thusoy/salt-states