Configuration Management

You can use configuration files and channels to manage configuration for your clients, rather than configuring each client manually.

Configuration parameters are scripted and stored in configuration files. You can write configuration files directly using the Uyuni Web UI, or you can upload or link to files that exist in other locations.

Configuration files can be centrally managed. Centrally managed configuration files are provided by global configuration channels and can be applied to any client subscribed to the Uyuni Server.

Configuration channels are used to organize configuration files. You can subscribe clients to configuration channels, and deploy configuration files as required.

Configuration files are version-controlled, so you can add configuration settings, test them on your clients, and roll back to a previous revision as required. When you have created your configuration channels, you can also perform comparisons between various configuration files, and between revisions of the same configuration file.

Centrally managed configuration files are provided by global configuration channels.

This table shows the supported features, where:

  • features are supported by SUSE

  • features are not supported by SUSE

  • features are under consideration, and may or may not be supported at a later date.

Table 1. Configuration Management Supported Features
Feature Status

Global Configuration Channels

Deploying Files

Comparing Files

Locally Managed Files

(with Salt features)

Sandbox Files

Applying the Highstate

File Import from a Client

Jinja Templating

Configuration Macros

(with Salt features: grains, pillar data, etc.)

1. Create Configuration Channels

1.1. Central Configuration Channel

To create a new central configuration channel:

Procedure: Creating Central Configuration Channel
  1. In the Uyuni Web UI, navigate to Configuration  Channels, and click Create Config Channel.

  2. Type a name for the channel.

  3. Type a label for the channel. This field must contain only letters, numbers, hyphens (-) and underscores (_).

  4. Type a description for the channel that allows you to distinguish it from other channels.

  5. Click Create Config Channel to create the new channel.

1.2. Salt State Channel

You can also use a configuration channel to manage Salt states on clients:

Procedure: Creating a Salt State Channel
  1. In the Uyuni Web UI, navigate to Configuration  Channels, and click Create State Channel.

  2. Type a name for the channel.

  3. Type a label for the channel. This field must contain only letters, numbers, hyphens (-) and underscores (_).

  4. Type a description for the channel that allows you to distinguish it from other channels.

  5. Type the SLS Contents for the init.sls file.

  6. Click Create Config Channel to create the new channel.

When you have created a configuration channel you can add a configuration file, directory, or symbolic link:

Procedure: Adding a Configuration File, Directory, or Symbolic Link
  1. In the Uyuni Web UI, navigate to Configuration  Channels, and click the name of the configuration channel that you want to add a configuration file to, and navigate to the Add Files  Create File subtab.

  2. In the File Type field, choose whether you want to create a text file, directory, or symbolic link.

  3. In the Filename/Path field, type the absolute path to the location where the file should be deployed.

  4. If you are creating a symbolic link, type the target file and path in the Symbolic Link Target Filename/Path field.

  5. Type the User name and Group name for the file in the Ownership field, and the File Permissions Mode.

  6. If the client has SELinux enabled, you can configure SELinux contexts to enable the required file attributes (for example: user, role, and file type).

  7. If the configuration file includes a macro, enter the symbol that marks the beginning and end of the macro.

  8. Enter the configuration file contents in the File Contents text box, using the script drop-down box to choose the appropriate scripting language.

  9. Click Create Configuration File.

3. Subscribe Clients to Configuration Channels

You can subscribe individual clients to configuration channels by navigating to Systems  System List, selecting the client you want to subscribe, and navigating to the Configuration tab. To subscribe multiple clients to a configuration channel, you can use the system set manager (SSM).

Procedure: Subscribing Multiple Clients to Configuration Channels
  1. In the Uyuni Web UI, navigate to Systems  Systems List and select the clients you want to work with.

  2. Navigate to Systems  System Set Manager, and go to the Configuration  Subscribe to Channels subtab to see the list of available configuration channels.

  3. OPTIONAL: Click the number in the Systems currently subscribed column to see which clients are currently subscribed to the configuration channel.

  4. Check the configuration channels you want to subscribe to, and click Continue.

  5. Rank the configuration channels using the up and down arrows. Where settings conflicts occur between configuration channels, channels closer to the top of the list take precedence.

  6. Determine how the channels are applied to the selected clients. Click Subscribe With Lowest Priority to add the new channels at a lower priority than currently subscribed channels. Click Subscribe with Highest Priority to add the new channels at a higher priority than currently subscribed channels. Click Replace Existing Subscriptions to remove existing channels and replace them with the new channels.

  7. Click Apply Subscriptions.

If new configuration channel priorities conflict with existing channels, the duplicate channel is removed and replaced according to the new priority. If the client’s configuration priorities are going to be reordered by an action, the Web UI requires you to confirm the change before proceeding.

4. Compare Configuration Files

You can also use the system set manager (SSM) to compare the configuration file deployed on clients with the configuration file stored on the Uyuni Server.

Procedure: Comparing Configuration Files
  1. In the Uyuni Web UI, navigate to Systems  Systems List and select the clients subscribed to the configuration files you want to compare.

  2. Navigate to Systems  System Set Manager, and go to the Configuration  Compare Files subtab to the list of available configuration files.

  3. OPTIONAL: Click the number in the Systems column to see which clients are currently subscribed to the configuration file.

  4. Check the configuration files to compare, and click Schedule File Comparison.

5. Jinja templating on clients

Jinja templating is possible on Salt clients. Jinja provides variables from pillars or grains. They can be used in configuration files or Salt states.

{% if grains.os_family == 'RedHat' %}
  {% set dns_cfg = '/etc/named.conf' %}
{% elif grains.os_family == 'Debian' %}
  {% set dns_cfg = '/etc/bind/named.conf' %}
{% else %}
  {% set dns_cfg = '/etc/named.conf' %}
{% endif %}
dns_conf:
  file.managed:
    - name: {{ dns_cfg }}
    - source: salt://dns/files/named.conf