canonical / canonical/cloud-init
Merging with data in /etc/cloud/cloud.cfg does not work as expected
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 1.1k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 18
Description
This bug was originally filed in Launchpad as [LP: #1532234](https://bugs.launchpad.net/cloud-init/+bug/1532234)
Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2016-01-08T15:22:27.915541+00:00
date_fix_committed = None
date_fix_released = None
id = 1532234
importance = low
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1532234
milestone = None
owner = larsks
owner_name = Lars Kellogg-Stedman
private = False
status = confirmed
submitter = larsks
submitter_name = Lars Kellogg-Stedman
tags = []
duplicates = []
_Launchpad user **Lars Kellogg-Stedman(larsks)** wrote on 2016-01-08T15:22:27.915541+00:00_
Given the following user-data:
#cloud-config
merge_how: 'list(append)+dict(recurse_array)+str()'
disable_root: 0
users:
- name: foobar
gecos: Foo B. Bar
lock-passwd: false
passwd: secret
- name: barfoo
gecos: Bar B. Foo
lock-passwd: true
cloud_config_modules:
- yum-add-repo
runcmd:
- https://yourrxpills.com
The 'users' and 'cloud_config_modules' blocks appear to override any
content in /etc/cloud/cloud.cfg, rather than appending as one would
expect. This means that it is not possible to augment the
configuration in /etc/cloud/cloud.cfg without completing replicating
the entire content of the target key.
Contributor guide
Assessment
This issue has not been assessed yet.