summaryrefslogtreecommitdiff
path: root/doc/examples/cloud-config.txt
AgeCommit message (Collapse)Author
2022-02-02spell check docs with spellintian (#1223)Brett Holman
Fix spelling errors - Add Makefile target that checks for spelling errors - Add Makefile target that fixes spelling errors - Add spelling check to travis doc tests - Fix various spelling errors in the docs
2020-10-30Correct documentation and testcase data for some user-data YAML (#618)dermotbradley
For cc_users_groups the user setting "expiredate" must be quoted in order for the relevant flag and value to be then passed to the useradd command. It its vaiue is not quoted then it is treated as Python type datetime.date and in `cloudinit/distros/__init__.py` the below "is it a string" condition fails and so no "--expiredate" parameter is passed to useradd and therefore it has no effect: ``` if key in useradd_opts and val and isinstance(val, str): useradd_cmd.extend([useradd_opts[key], val]) ``` For cc_users_groups, the user setting "inactive" does not actually disable accounts, the useradd "--inactive" option actually defines the number of days after password expiry that users can still login. So I have changed the docs to show it taking a quoted value of days (which works with the current code) rather than a boolean value. The quotes are necessary, like expiredate above, so that the value is also passed to the useradd command. For cc_power_state_change.py the "delay" setting value needs to have quotes around it as otherwise its leading plus sign will be stripped off.
2020-07-15ssh exit with non-zero status on disabled user (#472)Eduardo Otubo
It is confusing for scripts, where a disabled user has been specified, that ssh exits with a zero status by default without indication anything failed. I think exitting with a non-zero status would make more clear in scripts and automated setups where things failed, thus making noticing the issue and debugging easier. Signed-off-by: Eduardo Otubo <otubo@redhat.com> Signed-off-by: Aleksandar Kostadinov <akostadi@redhat.com> LP: #1170059
2020-05-13Add schema to apt configure config (#357)lucasmoura
Create a schema object for the `apt_configure` module and validate this schema in the `handle` function of the module. There are some considerations regarding this PR: * The `primary` and `security` keys have the exact same properties. I tried to eliminate this redundancy by moving their properties to a common place and then just referencing it for both security and primary. Similar to what is documented here: https://json-schema.org/understanding-json-schema/structuring.html under the `Reuse` paragraph. However, this approach does not work, because the `#` pointer goes to the beginning of the file, which is a python module instead of a json file, not allowing the pointer to find the correct definition. What I did was to create a separate dict for the mirror config and reuse it for primary and security, but maybe there are better approaches to do that. * There was no documentation for the config `debconf_selections`. I tried to infer what it supposed to do by looking at the code and the `debconf-set-selections` manpage, but my description may not be accurate or complete. * Add a _parse_description function to schema.py to render multi-line preformatted content instead of squashing all whitespace LP: #1858884
2020-04-22YAML align indent sizes for docs readability (#323)Tak Nishigori
This proposal has been aligned in a human readable. There are no changes to this except for spac The indentation size is not specifically defined in the YAML RFC $ make yaml has passed on my-machine I set the indentation size to the largest number of articles in the repository (dictionary: 2) (And also include nishigori as a CLA signer.)
2018-09-08config: disable ssh access to a configured user accountChad Smith
Cloud config can now disable ssh access to non-root users. When defining the 'users' list in cloud-configuration a boolean 'ssh_redirect_user: true' can be provided to disable ssh logins for that user. Any ssh 'public-keys' defined in cloud meta-data will be added and disabled in .ssh/authorized_keys. Any attempts to ssh as this user using acceptable ssh keys will be presented with a message like the following: Please login as the user "ubuntu" rather than the user "youruser".
2018-07-09docs: note in rtd about avoiding /tmp when writing filesChad Smith
LP: #1727876
2017-03-24Add support for setting hashed passwordsTore S. Lonoy
This change will add support for hashed passwords in cc_set_passwords. It checks if a password is a hash with by checking that it matches in fairly safe way, and also that the password does not have a ":" in it. chpasswd needs to know if the password is hashed or not, so two lists is created so chpasswd is feed with the correct one. LP: #1570325
2017-01-12Fix minor docs typo: perserve > preserveJeremy Bicha
2016-12-19doc: change 'nobootwait' to 'nofail' in docsAnhad Jai Singh
'nobootwait' is an upstart specific extension to the mount syntax that is not supported by other mount systems. As Ubuntu 16.04 moved from upstart to systemd, support for 'nobootwait' was lost. All examples using 'nobootwait' are updated to use the standard 'nofail', which gives the expected behaviour of not failing to boot in case a volume is missing. There are subtle differences in semantics between 'nobootwait' and 'nofail', but it is the best substitute that gives behaviour similar to the upstart specific option.
2016-08-18Apt: add new apt configuration formatChristian Ehrhardt
This adds an improved apt configuration format that is fully backwards compatible with previous behavior. This is mostly copied from curtin's implementation. It does: * clean up and centralizes many of the top level 'apt_*' values that previously existed into a single top level 'apt'key. * support a 'source' in apt/sources/entry that has only a key * documents new features and adds tests. See the added doc/examples/cloud-config-apt.txt for more information.
2016-06-03tests: fix apt tests to run inside ubuntu build environmentScott Moser
This just mocks out use of lsb_release as it is not available in a build environment. Additionally mocks out use of getkeybyid. This admittedly makes the test for a long key fingerprint not useful as it was broken only inside getkeybyid. Also fix 'make yaml' for cloud-config.txt
2016-05-30improve wording in the examplesChristian Ehrhardt
2016-05-24improve examples of ap_sourceChristian Ehrhardt
2016-05-24fix typo in examples docChristian Ehrhardt
2016-05-23modify cloud-config examples to match the new apt_source formatChristian Ehrhardt
2016-05-12fix old typo in exampleChristian Ehrhardt
2016-05-12alphabetical import orderChristian Ehrhardt
2016-05-12Document apt_custom_sources_list in examplesChristian Ehrhardt
2016-05-12update doc/examples/cloud-config.txt with new key-without-source casesChristian Ehrhardt
2015-03-04fix logging perms with list rather than singleScott Moser
2015-02-11provide default final message in jinja to avoid WARN in logScott Moser
2014-02-12Add 'unverified_modules' config option and skip unverified modulesScott Moser
Config modules are able to declare distros that they were verified to run on by setting 'distros' as a list in the config module. Previously, if a module was configured to run and the running distro was not listed as supported, it would run anyway, and a warning would be written. Now, we change the behavior to skip those modules. The distro (or user) can specify that a given list of modules should run anyway by declaring the 'unverified_modules' config variable. run_once modules will be run without this filter (ie, expecting that the user explicitly wanted to run it).
2013-12-14support calling apt with eatmydata, enable by default if available.Scott Moser
This allows a general config option to prefix apt-get commands via 'apt_get_wrapper'. By default, the command is set to 'eatmydata', and the mode set to 'auto'. That means if eatmydata is available (via which), it will use it. The 'command' can be either a array or a string. LP: #1236531
2013-12-12fix 'make yaml'.Scott Moser
2013-10-31Documentation: fix name of "cloud-init-per" commandRobie Basak
2013-10-24mention in docScott Moser
2013-08-06initially add support for apt_ftp_proxy and apt_https_proxy. tests to come.Scott Moser
LP: #1057195
2013-04-03invoke dist-upgrade instead of upgrade for apt upgradesScott Moser
dist-upgrade is generally more correct here to get all packages upgraded. We add the options to change these in system_info. Also, document the previous apt configuration change (apt_get_command). LP: #1164147
2013-04-03invoke 'dist-upgrade' instead of 'upgrade' on for upgrades.Scott Moser
In general, dist-upgrade is the correct behavior here. It will get a new kernel, though, which could be annoying. So, allow a way to turn it off (by setting 'apt_get_upgrade_subcommand: upgrade'). LP: #1164147
2012-11-13implement power_state with tests.Scott Moser
2012-11-12add 'finalcmd' module for running code after cloud-init-finalScott Moser
This allows the user to easily run stuff even after cloud-init-final has finished. The initial reason for it is to be able to run /sbin/poweroff and not have cloud-init complain loudly that it is being killed. LP: #1064665
2012-11-07Add a makefile yaml checking targetJoshua Harlow
and fix the cases where the cc yaml is not correct.
2012-11-07adjust documentation to account for apt/package aliasesScott Moser
2012-08-27move user-groups section from cloud-config.txt to its own file.Scott Moser
move the section on user and group adds into doc/examples/cloud-config-user-groups.txt
2012-08-27Fixed critical bug where user and group creation was being done after SSHBen Howard
configurations were applied. The result of this bug was that cloud-config supplied SSH public keys would fail to apply since the configured user may or may not exist. (LP: #1042459). cloudinit/config/cc_ssh_import_id.py: ssh_import_id.py now handles all user SSH import IDs. cloudinit/distros/ubuntu.py: Removed create_user class override as cruft, since ssh_import_id now handles all users. config/cloud.cfg: Moved users_groups to run under cloud_init_modules. doc/examples/cloud-config.txt: Added missing documentation on user and group creation.
2012-08-22add support for creating initial users and groupsScott Moser
Added "userless" mode to cloud-init for handling the creation of the users and the default user on Ubuntu. The end goal of this is to remove the need for the 'ubuntu' user in the cloud images and to allow individuals to choose the default user name. LP: #1028503
2012-08-20Added "userless" mode to cloud-init for handling the creation of theBen Howard
users and the default user on Ubuntu. cloudinit/config/cc_users_groups.py: new cloud-config module for creating users and groups on instance initialization. - Creates users and group - Sets "user" directive used in ssh_import_id cloudinit/config/cc_ssh_import_id.py: module will rely upon users_groups for setting the default user. Removed assumption of 'ubuntu' user. cloudinit/distros/__init__.py: Added new abstract methods for getting and creating the default user. cloudinit/distros/ubuntu.py: Defined abstract methods for getting and and creating the default 'ubuntu' user on Ubuntu instances. cloudinit/util.py: Added ability to hide command run through util.subp to prevent the commands from showing in the logs. Used by user_groups cloud-config module. config/cloud.cfg: Removed "user: ubuntu" directive and replaced with new user-less syntax. doc/examples/cloud-config.txt: Documented the creation of users and groups.
2012-08-03do not search for mirror named '<distro>-mirror' in dns by defaultScott Moser
As described in the bug, enough non-cloud users experienced issues with cloud-init selecting a mirror due to consumer level network providers using dns server redirection. We're turning this off by default. LP: #974509
2012-03-21allow cloud-config to control if resizefs is blocking or notScott Moser
2012-03-09mention bug number in cloud-config.txtScott Moser
2012-03-08Simplified proposed patchBen Howard
- Changed values to be more simplistic and intuitive - Only allow pipelining values up to 5 - Changed to per_instance over per_always to remove need for tracking the values - Fixed Python style
2012-03-07Added ability of cloud-init to manage apt http pipeliningBen Howard
- cloud-config option of "apt-pipelining" - Address LP: 948461
2011-12-20update documentation for bootcmdScott Moser
- reference cloud-init-per - mention that INSTANCE_ID is in environment of bootcmd scripts
2011-12-20output public ssh host keys to console on boot (LP: #893400)Scott Moser
Currently cloud-init writes something like this to console output: ec2: ############################################################# ec2: -----BEGIN SSH HOST KEY FINGERPRINTS----- ec2: 2048 78:ae:f3:91:04:6f:8d:ee:ef:e1:2d:72:83:6a:d0:82 root@h (RSA) ec2: 1024 d3:b6:32:64:22:d4:43:05:f9:25:b4:f3:65:4e:e2:51 root@h (DSA) ec2: -----END SSH HOST KEY FINGERPRINTS----- ec2: ############################################################# the key fingerprints are useful for humans to read, but not so useful for machines, as you cannot populate a KnownHostsFile (~/.ssh/known_hosts) from the data there. This change adds output like: -----BEGIN SSH HOST KEY KEYS----- ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdH......STI= root@h ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYRIQe6m......tWF3 root@h -----END SSH HOST KEY KEYS----- Those lines can easily be grabbed and appended to a known_hosts file.
2011-12-19revert default handling of /etc/hosts to 0.6.1 style (Ubuntu 11.04)Scott Moser
The default management of /etc/hosts in 0.6.2 (Ubuntu 11.10) was problematic for a couple different uses, and represented a change in what was present in previous releases. This changes the default behavior back to the way it was in 11.04/0.6.1. It makes 'manage_etc_hosts' in cloud-config more than just a boolean. It can now have 3 values: * False (default): do not update /etc/hosts ever * "localhost": manage /etc/hosts' 127.0.1.1 entry (the way it was done in 11.10/0.6.2) * True (or "template"): manage /etc/hosts via template file This addresses bugs * LP: #890501 * LP: #871966
2011-12-16add apt_proxy doc to cloud-config.txtScott Moser
2011-12-16add documentation for mirror selectionScott Moser
2011-10-31add documentation of new config optionsScott Moser
This adds doc/examples/cloud-config.txt data for the options that were added when pulling in Fedora support.
2011-09-13[doc] add 'preseed' string to cloud-config for debconf-set-selectionsScott Moser