summaryrefslogtreecommitdiff
path: root/templates
AgeCommit message (Collapse)Author
2022-01-30Do not support setting up archive.canonical.com as a source (#1219)Steve Langasek
The partner archive is now obsolete. LP: #1959343
2022-01-20Add support for gentoo templates and cloud.cfg (#1179)vteratipally
2021-10-26hosts.alpine.tmpl: rearrange the order of short and long hostnames (#1084)dermotbradley
The Alpine /etc/hosts template results in a file where the long form of names (including localhost) come before the short form. This means that when running tools like 'netstat' and 'ss' which convert IP address to names that their output will show 'localhost.localdomain' rather than 'localhost.' This patch swaps the order of the short and long form names so such utils will show the short form name. It also removes several unnecessary IPv6-specific entries.
2021-10-21Update Debian security suite for bullseye (#1076)Johann Queuniet
2021-09-16Update IPv6 entries in /etc/hosts (#1021)Richard Hansen
Add IPv6 localhost (::1) entry. See: https://salsa.debian.org/installer-team/netcfg/-/blob/1767c9264e04652b9150ffc7b25568e4ea6b2bdd/netcfg.h#L42 https://salsa.debian.org/md/netbase/-/blob/9de8afcad482418cc4956dc09bbf6a2e8624d574/debian/netbase.postinst#L8 Also remove ip6-localnet, ip6-mcastprefix, and ip6-allhosts. See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=499800 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688090 LP: #1943798
2021-06-18Add support for VMware PhotonOS (#909)sshedi
Also added a new (currently experimental) systemd-networkd renderer, and includes a small refactor to cc_resolv_conf.py to support the resolved.conf used by systemd-resolved.
2021-04-26Fix chef module run failure when chef_license is set (#868)Ben Hughes
Move chef_license from TPL_PATH_KEYS to TPL_KEYS as the chef license setting is not a path but must be added to the client config template. Fixes file or folder not found exception raised from ensure_dirs.
2020-08-19Add Alpine Linux support. (#535)dermotbradley
Add new module cc_apk_configure for creating Alpine /etc/apk/repositories file. Modify cc_ca_certs, cc_ntp, cc_power_state_change, and cc_resolv_conf for Alpine. Add Alpine template files for Chrony and Busybox NTP support. Add Alpine template file for /etc/hosts.
2020-07-07Add update_etc_hosts as default module on *BSD (#479)Adam Dobrawy
* Add update_etc_hosts as default module on *BSD * Set preference of IPv6 over IPv4 in FreeBSD /etc/hosts
2020-05-27Enable chef_license support for chef infra client (#389)Bipin Bachhao
Co-authored-by: Daniel Watkins <oddbloke@ubuntu.com>
2020-05-07make suse and sles support 127.0.1.1 (#336)chengcheng-chcheng
Move from 127.0.0.1 to 127.0.1.1 for localhost IP addr for opensuse and sles
2020-03-13cc_resolv_conf: introduce tests and stabilise output across Python versions ↵Daniel Watkins
(#251) This is a follow-up to #144 which fixed the rendering behaviour. While writing the tests, CI failed due to dict iteration differences across Python versions, so this also sorts output so that we will produce the same output across Python versions.
2020-03-12fix minor issue with resolv_conf template (#144)andreaf74
2019-07-16templates/ntp.conf.debian.tmpl: fix missing newline for poolsRyan Harper
The debian ntp.conf template did not contain a newline for the comment used to mark the rendered ntp pools configured. This resulted in an invalid line: '# poolspool 0.int.pool.ntp.org iburst' rather than: '# pools  pool 0.int.pool.ntp.org iburst' This patch fixes the template and updates the unittest to verify that the rendered templates puts servers and pools at the beginning of a line. LP: #1836598
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).