summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_puppet.py
AgeCommit message (Collapse)Author
2020-07-13Fix two minor warnings (#475)Daniel Watkins
2020-06-08Move subp into its own module. (#416)Scott Moser
This was painful, but it finishes a TODO from cloudinit/subp.py. It moves the following from util to subp: ProcessExecutionError subp which target_path I moved subp_blob_in_tempfile into cc_chef, which is its only caller. That saved us from having to deal with it using write_file and temp_utils from subp (which does not import any cloudinit things now). It is arguable that 'target_path' could be moved to a 'path_utils' or something, but in order to use it from subp and also from utils, we had to get it out of utils.
2020-01-31cloudinit: replace "from six import X" imports (except in util.py) (#183)Daniel Watkins
2019-10-31cc_puppet: Implement csr_attributes.yaml supportMatthias Baur
This change adds two new parameters: * csr_attributes * csr_attributes_path Those parameters allow to configure the content of the csr_attributes.yaml file. See https://puppet.com/docs/puppet/latest/config_file_csr_attributes.html
2019-10-17replace any deprecated log.warn with log.warningDominic Schlegel
Commit 6797e822959b84c98cf73e02b2a6e3d6ab3fd4fe replaced the LOG.warn calls that linters were warning about; this also replaces calls that linters would not have recognised (as `log` is generally a parameter in these scenarios). LP: #1508442
2018-03-26cc_puppet: Revert regression of puppet creating ssl and ssl_cert dirsChad Smith
Replace regressed cc_puppet functionality from a1f678f8. The following content was inadvertently dropped: - chown /var/lib/puppet/ssl as puppet:root. - Automatic creation of /var/lib/puppet/ssl/certs
2018-03-16cc_snap: Add new module to install and configure snapd and snap packages.Chad Smith
Support installing and configuring snaps on ubuntu systems. Now, cloud-config files can provide a list or dictionary of snap:assertions which will be allow configuration of snapd on a system via 'snap ack' calls. The snap:commands configuration option supports arbitrary system commands intended to interact with snappy's cli. This allows users to run arbitrary snappy commands to create users, download, install and configure snap packages and snapd. This branch also deprecates old snappy and snap_config modules leaving warnings in documentation and runtime for consumers of these modules. Deprecated snap* modules will be dropped in cloud-init v.18.2 release.
2018-02-26Implement puppet 4 supportRomanos Skiadas
Make puppet installation more configurable by: - Adding a package_name parameter - Exposing the puppet configuration and puppet ssl directories as parameters. These default to the previous values if unset, but can be set to the new values puppetlabs requires for its puppet 4.x packages. This way puppet 4 configuration is now possible. LP: #1446804
2017-08-23cc_landscape & cc_puppet: Fix six.StringIO use in writing configsChad Smith
Both landscape and puppet modules had issues with the way they wrote /etc/landscape/client.conf or /etc/puppet/puppet.conf in either python3 or python2. This branch adds initial unit tests for both modules which will get better exercise under both python2 and python3. The unit tests shed light on a few issues: - In the cc_landscape module py3 can't provide six.StringIO content to ConfigParser.write, so we need to use six.BytesIO instead - In the cc_puppet module, python <= 2.7 doesn't support using six.StringIO as a context manager, so we drop the context manager fanciness and directly set outputstream = StringIO(). - The docstring in cc_puppet is fixed to document the 'conf' sub-key requiring valid puppet section names for each key-value list. LP: #1699282 LP: #1710932
2016-12-22LICENSE: Allow dual licensing GPL-3 or Apache 2.0Jon Grimm
This has been a recurring ask and we had initially just made the change to the cloud-init 2.0 codebase. As the current thinking is we'll just continue to enhance the current codebase, its desirable to relicense to match what we'd intended as part of the 2.0 plan here. - put a brief description of license in LICENSE file - put full license versions in LICENSE-GPLv3 and LICENSE-Apache2.0 - simplify the per-file header to reference LICENSE - tox: ignore H102 (Apache License Header check) Add license header to files that ship. Reformat headers, make sure everything has vi: at end of file. Non-shipping files do not need the copyright header, but at the moment tests/ have it.
2016-09-30Improve module documentation and doc cleanup.Wesley Wiedenmeier
This adds lots of config module documentation in a standard format. It will greatly improve the content at readthedocs. Additionally: * Add a 'doc' env to tox.ini * Changed default highlight language for sphinx conf from python to yaml most examples in documentation are yaml configs * Updated datasource examples to highlight sh code properly
2016-03-03Update pep8 runner and fix pep8 issuesRyan Harper
2015-01-27Respond to review:Barry Warsaw
- Remove str() wrappers to second argument to write_files() where it is no longer necessary. Also: Fixed a couple of other octal literals which clearly weren't being tested.
2015-01-21Largely merge lp:~harlowja/cloud-init/py2-3 albeit manually because it seemedBarry Warsaw
to be behind trunk. `tox -e py27` passes full test suite. Now to work on replacing mocker.
2013-01-27Adding package versioning logic to package_commandCraig Tracey
This change adds the ability to provide specific package versions to Distro.install_packages and subsequently Distro.package_command. In order to effectively use Distro.install_packages, one is now able to pass a variety of formats in order to easily manage package requirements. These are examples of what can be passed: - "package" - ["package1","package2"] - ("package",) - ("package", "version") - [("package1",)("package2",)] - [("package1", "version1"),("package2","version2")] This change also adds the option to install a specific version for the puppet configuration module. This is especially important here as successful puppet deployments are highly reliant on specific puppet versions.
2012-12-13Provide a mechanism for puppet to be conditionally installed.Craig Tracey
2012-10-27Helpful cleanups.harlowja
1. Remove the usage of the path.join function now that all code should be going through the util file methods (and they can be mocked out as needed). 2. Adjust all occurences of the above join function to either not use it or replace it with the standard os.path.join (which can also be mocked out as needed) 3. Fix pylint from complaining about the tests folder 'helpers.py' not being found 4. Add a pylintrc file that is used instead of the options hidden in the 'run_pylint' tool.
2012-08-22fix pep8 complaints.Scott Moser
make pep8 now is silent on precise's pep8 ( 0.6.1-2ubuntu2).
2012-06-211. Renames for debug message from 'transform' to 'module'harlowja
2. Fixing up more cloud.path.joins found to use the right ro/rw filename
2012-06-20Massive pylint + pep8 fixups!Joshua Harlow
2012-06-20The 'cfg' module has been removed and moved to 'helpers' to avoid confusion. ↵Joshua Harlow
These modules used the 'cfg' modules so adjusted them.