salt.runners.spacewalk

Spacewalk Runner

New in version 2016.3.0.

Runner to interact with Spacewalk using Spacewalk API

codeauthor

Nitin Madhok <nmadhok@clemson.edu>, Joachim Werner <joe@suse.com>, Benedikt Werner <1benediktwerner@gmail.com>

maintainer

Benedikt Werner <1benediktwerner@gmail.com>

To use this runner, set up the Spacewalk URL, username and password in the master configuration at /etc/salt/master or /etc/salt/master.d/spacewalk.conf:

spacewalk:
  spacewalk01.domain.com:
    username: 'testuser'
    password: 'verybadpass'
  spacewalk02.domain.com:
    username: 'testuser'
    password: 'verybadpass'

Note

Optionally, protocol can be specified if the spacewalk server is not using the defaults. Default is protocol: https.

salt.runners.spacewalk.addGroupsToKey(server, activation_key, groups)

Add server groups to a activation key

CLI Example:

salt-run spacewalk.addGroupsToKey spacewalk01.domain.com 1-my-key '[group1, group2]'
salt.runners.spacewalk.api(server, command, *args, **kwargs)

Call the Spacewalk xmlrpc api.

CLI Example:

salt-run spacewalk.api spacewalk01.domain.com systemgroup.create MyGroup Description
salt-run spacewalk.api spacewalk01.domain.com systemgroup.create arguments='["MyGroup", "Description"]'

State Example:

create_group:
  salt.runner:
    - name: spacewalk.api
    - server: spacewalk01.domain.com
    - command: systemgroup.create
    - arguments:
      - MyGroup
      - Description
salt.runners.spacewalk.deleteAllActivationKeys(server)

Delete all activation keys from Spacewalk

CLI Example:

salt-run spacewalk.deleteAllActivationKeys spacewalk01.domain.com
salt.runners.spacewalk.deleteAllGroups(server)

Delete all server groups from Spacewalk

salt.runners.spacewalk.deleteAllSystems(server)

Delete all systems from Spacewalk

CLI Example:

salt-run spacewalk.deleteAllSystems spacewalk01.domain.com
salt.runners.spacewalk.unregister(name, server_url)

Unregister specified server from Spacewalk

CLI Example:

salt-run spacewalk.unregister my-test-vm spacewalk01.domain.com