summaryrefslogtreecommitdiff
path: root/templates
AgeCommit message (Collapse)Author
2019-02-25Enable encrypted_data_bag_secret support for ChefEric Williams
Encrypted data bags require a secrets file to be present to decrypt, and the location of the file must be configured the Chef client configuration file, client.rb. This update enables cloud-init's chef module to update that setting in client.rb. LP: #1817082
2018-10-04Ubuntu: update sources.list to comment out deb-src entries.Scott Moser
Other installation modes began to comment out the deb-src lines in /etc/apt/sources.list sometime in 16.04 time frame. This makes the cloud-init rendered sources.list the same as that currently present in the lxd images. The changes here are: a.) comment out all 'deb-src' lines. b.) move security to the bottom of the file. c.) trim trailing white space from 3 comment lines. LP: #74747
2018-04-12renderer: support unicode in render_from_file.Scott Moser
If a file passed to render_from_file had non-ascii text then jinja in python2 would decode as ascii, which would cause UnicodeDecodeError. This issue can be re-created in python2 with just: 'can\xe2\x80\x99t'.decode() The solution here is to explicitly pass in unicode supporting type (py3 str, py2 unicode). Those are six.text_type. Then jinja does not try to decode. The reason we hit this is that load_file calls decode_binary. decode_binary believes it has no work to do if it got a six.string_types. isinstance('can\xe2\x80\x99t', six.string_types) == True So it returns the original string which will blow up for jinja. Our fix here then is to load the file in binary mode and explicitly decode it to utf-8. Then in python2 we'll have a unicode type and in python3 we'll have a string type.
2018-04-12Implement ntp client spec with auto support for distro selectionRyan Harper
Add a base NTP client configuration dictionary and allow Distro specific changes to be merged. Add a select client function which implements logic to preferr installed clients over clients which need to be installed. Also allow distributions to override the cloud-init defaults. LP: #1749722
2017-11-16ntp: fix configuration template rendering for openSUSE and SLESChad Smith
Add opensuse distro support to cc_ntp module. LP: #1726572
2017-11-10hosts: Fix openSUSE and SLES setup for /etc/hosts and clarify docs.Robert Schweikert
The etc/hosts file is was not properly setup for openSUSE or SLES when manage_etc_hosts is set in the config file. Improve the doc to address the fact that the 'localhost' ip is distribution dependent (not always 127.0.0.1). LP: #1731022
2017-08-30suse: Add support for openSUSE and return SLES to a working state.Robert Schweikert
This gets initial opensuse and SLES support back to a working state. Still missing is more complete network file writing and unit tests.
2017-08-22Debian: Remove non-free repositories from apt sources template.Joonas Kylmälä
The Debian GNU/Linux distribution doesn't come offically with the non-free repositories enabled. Therefore, we want to disable those in the cloud-init template. LP: #1700091
2017-08-04cc_ntp: fallback on timesyncd configuration if ntp is not installableRyan Harper
Some systems like Ubuntu-Core do not provide an ntp package for installation but do include systemd-timesyncd (an ntp client). On such systems cloud-init will generate a timesyncd configuration using the 'servers' and 'pools' values as ntp hosts for timesyncd to use. LP: #1686485
2017-06-15debian: fix path comment in /etc/hosts template.Jens Sandmann
The comments in the debian template file of /etc/hosts still pointed to a general template file instead of the debian one. LP: #1606406
2017-06-15suse: add hostname and fully qualified domain to template.Jens Sandmann
This just adds an entry for hostname and fqdn to 127.0.0.1 in templates/hosts.suse.tmpl.
2017-04-21template: Update debian backports templateJoshua Powers
Debian backports are contains in the main repo and not somewhere seperate. Thanks to Charles Plessy. LP: #1627293
2016-08-10add ntp config moduleRyan Harper
Add support for installing and configuring ntp service, exposing the minimum config of servers or pools to be added. If none are defined then fallback on generating a list of pools by distro hosted at pool.ntp.org (which matches what's found in the default ntp.conf shipped in the respective distro).
2016-08-05revert unintended change to ubuntu sources listScott Moser
templates/sources.list.ubuntu.tmpl was inadvertantely changed in a previous commit. Simply revert to older version.
2016-07-19mcollective: add tests, cleanups and bug fix when no config in /etc.Scott Moser
Things here: - restart rather than 'start' the service, to pick up a config change that we would have written. - update the config and write cert files whether or not the file existed on the system. Previously it would only write the cert files if /etc/mcollective/server.cfg already existed. - improve test coverage
2016-04-12chef: straighten out validation_cert and validation_keyScott Moser
Now, validation_key is always a path to a file, as it is in chef's client.rb syntax. validation_cert is always the *content* of that file that should be written. However, if validation_cert is the string "system", then we do not write that value, but rather assume the file exists. LP: #1568940
2015-11-05ubuntu templates: enable backportsScott Moser
Previous commit intended to enable backports, but failed to do so.
2015-11-03Ubuntu templates: make sources.list consistent with ISO installs.Scott Moser
This modifies a designed decision to have trimmer sources.list than one would find on a server iso install. Specifically, here we now enable: restricted and multiverse and backports. LP: #1177432
2015-11-02Fixed per MP reviewBen Howard
2015-11-02Enable backports source pockets for Ubuntu archives (LP: #1177432).Ben Howard
2015-01-22Low hanging Python 3 fruit.Barry Warsaw
2014-10-11More adjustmentsJoshua Harlow
- Use the generated_by() utility function to give the ruby template a better header comment - Set special parameters after selecting the basic chef parameters.
2014-10-10Increase the robustness of the chef moduleJoshua Harlow
Add the following adjustments to the chef template and module - Make it so that the chef directories can be provided (defaults to the existing directories) - Make the params much more configurable, and if a parameter is provided in the chef configuration it will override existing template parameters. - Make the template skip lines if the values are None in the configuration so that template lines can be removed if/when this is desirable. - Allow the firstboot json path to be configurable (defaults to the existing location). - Adds a basic set of tests to ensure that good things are happening.
2014-09-22merge from trunkScott Moser
2014-08-21fix rendering resolv.conf if no 'options' are providedScott Moser
this makes some changes to the cc_resolv_conf to make its generate_resolv_conf method more easily callable (for future test). Also sets it up so that 'options' is always defined when the template is rendered. LP: #1328953
2014-08-18new: Added FreeBSD template for manage_etc_hosts supportJoseph Bajin
2014-03-05Switch to jinja & adjust tplsJoshua Harlow
2013-06-25Add SLES hosts template fileJuerg Haefliger
2013-02-21Split Debian and Ubuntu APT sourcesVlastimil Holer
2013-01-29Fix broken cc_update_etc_hostsharlowja
Right now, all distros but ubuntu will fail to manage /etc/hosts. This is due to the fact that the templates are named: - hosts.ubuntu.tmpl - hosts.redhat.tmpl The config handler is specifically looking for a template with the given distro name. This change addresses this issue.
2013-01-17Adding a resolv.conf configuration module (LP: #1100434)Craig Tracey
Managing resolv.conf can be quite handy when running in an environment where you would like to control DNS resolution, despite being provided DNS server information by DHCP. This module will allow one to define the structure of their resolv.conf and write it PER_ONCE. Right now this makes the most sense on RedHat, and therefore, has defined 'distros' as such.
2013-01-15Fix broken cc_update_etc_hosts (LP: #1100036)ctracey
Right now, all distros but ubuntu will fail to manage /etc/hosts. This is due to the fact that the templates are named: - hosts.ubuntu.tmpl - hosts.redhat.tmpl The config handler is specifically looking for a template with the given distro name. This change addresses this issue and is contingent upon support of 'osfamilies' as implemented in LP: #1100029 (lp:~craigtracey/cloud-init/osfamilies)
2012-08-22rework package mirror selectionScott Moser
There are several changes here. * Datasource now has a 'availability_zone' getter. * get_package_mirror_info * Datasource convenience 'get_package_mirror_info' that calls the configured distro, and passes it the availability-zone * distro has a get_package_mirror_info method * get_package_mirror_info returns a dict that of name:mirror this is to facilitate use of 'security' and 'primary' archive. * this supports searching based on templates. Any template that references undefined values is skipped. These templates can contain 'availability_zone' (LP: #1037727) * distro's mirrors can be arch specific (LP: #1028501) * rename_apt_lists supports the "mirror_info" rather than single mirror * generate_sources_list supports mirror_info, and as a result, the ubuntu mirrors reference '$security' rather than security (LP: #1006963) * remove the DataSourceEc2 specific mirror selection, but instead rely on the above filtering, and the fact that 'ec2_region' is only defined if the availability_zone looks like a ec2 az.
2012-07-09add header/explanation to templates/chef_client.rb.tmplScott Moser
2012-07-09Revert back to using cheetah + adjust resultant code + templatesJoshua Harlow
At this point there is a mixture of "double hash" cheetah comments and '#*' cheetah comments.
2012-06-21Updated so that the locale that is being written out currently in 'cc_locale'Joshua Harlow
now will be done by the distro classes (since its not the same for rhel and ubuntu). Remove the template also since it will just be created by the ubuntu distro class (its just one line).
2012-06-181. Removed the welcome message for now :-)Joshua Harlow
2012-06-15Renamed hosts to match the ubuntu distro.Joshua Harlow
Also converted all the other templates to tempita format instead of the more complicated (and more dependent on other packages) cheetah format.
2012-06-15Added a hosts template file (in tempita format) that provides the base of a ↵Joshua Harlow
"/etc/hosts" file for rhel like systems.
2012-06-15Added a new transform that can be used to show and initial welcome message ↵Joshua Harlow
to users. It is similar to the final msg one, but is used at the start of cloud init instead.
2011-09-10Modifications to properly support both 'gems' and 'packages' install types.Mike Moulton
Added support for 'node_name' and 'environment' properties. Renamed 'validation_cert' to 'validation_key' to match Chef's nomenclature.
2011-07-19improve the updating of /etc/hosts with correct fqdn when possibleScott Moser
Thanks to Adam Gandalman and Marc Cluet for this fix. LP: #812539
2011-04-21Added Chef pluginAvishai Ish-Shalom
2011-03-10mention sources.list.tmpl in sources.list.tmpl so user knows what to changeScott Moser
2011-02-17update /etc/hosts hosts.tmpl to if 'manage_etc_hosts' is set in cloud-configScott Moser
LP: #720440
2010-08-31get '##' comment lines through to /etc/apt/sources.list (LP: #627439)Scott Moser
LP: #627439
2010-08-19add commented out entries for partner, backports, and multiverseScott Moser
LP: #620572
2009-12-14sync karmic and trunkScott Moser
This commit merges lp:~soren/ec2-init/0.5 at rev 67 and lp:ubuntu/lucid at 0.4.999-0ubuntu8
2009-08-11Update /etc/default/locale with locale setting derived from locality.Soren Hansen
2009-04-06* ec2-set-hostname.py:Chuck Short
- Use template for /etc/hosts creation. - Dont use public_hostname in /etc/hosts. (LP: #352745) * debian/control: - Add python-cheetah as a depends. * templates/sources.list.tmpl: - Update template. * debian/init: - Run the ec2-user-data script last so that the users get a stable system before running the user scripts.