Upgrade the module

After you complete the preparation steps, you are ready to upgrade the module.

  1. Update the module declaration in the Puppetfile. Specify the version number to which you are upgrading.
    To upgrade the module to version 2.0.0 or later, replace cem_linux with sce_linux and specify the version, as shown in this example for v2.0.0:
    mod 'puppetlabs/sce_linux', '2.0.0'

    To upgrade the module to a version earlier than v2.0.0, specify the CEM declaration accordingly as shown in this example for v1.8.0:

    mod 'puppetlabs/cem_linux', '1.8.0'

    For instructions about modifying the Puppetfile, see Declare Forge modules in the Puppetfile.

  2. Commit the change to the appropriate branch.
  3. Deploy the change by using Code Manager or r10k.
  4. If you determined during the preparation process that configuration updates are required, implement the configuration updates. For instructions, see Configuring SCE.
  5. If you upgraded the module from CEM to SCE v2.0.0 or later, delete extraneous artifacts from previous releases to help avoid operational issues. For instructions, see Clean up the system after an upgrade to SCE v2.0.0.

Results

After the upgrade, the next Puppet run creates files in the /etc/sysctl.d/ directory. Existing files in the directory are not deleted and remain as duplicates under a new name with a different prefix. Optionally, you can delete the duplicate files by using the Puppet Bolt delete_files task.

If you have Puppet Enterprise installed, you can run the task in Puppet Enterprise Console by going to the Tasks section and running the sce_linux::delete_files task.

If you do not have Puppet Enterprise installed, run a Puppet Bolt task. See Running tasks.

In both cases, the only required task parameter is files. Specify an array of absolute paths to the files, directories, or both that you want to delete. Use a comma-separated list, for example:

['/directory/subdirectory/file_to_delete', '/directory/subdirectory/directory_to_delete']