diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/cloud.cfg.tmpl | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl index 18ab0ac5..99f96ea1 100644 --- a/config/cloud.cfg.tmpl +++ b/config/cloud.cfg.tmpl @@ -21,8 +21,11 @@ disable_root: false disable_root: true {% endif %} -{% if variant in ["centos", "fedora", "rhel"] %} +{% if variant in ["amazon", "centos", "fedora", "rhel"] %} mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2'] +{% if variant == "amazon" %} +resize_rootfs: noblock +{% endif %} resize_rootfs_tmp: /dev ssh_pwauth: 0 @@ -42,6 +45,13 @@ datasource_list: ['NoCloud', 'ConfigDrive', 'Azure', 'OpenStack', 'Ec2'] # timeout: 5 # (defaults to 50 seconds) # max_wait: 10 # (defaults to 120 seconds) + +{% if variant == "amazon" %} +# Amazon Linux relies on ec2-net-utils for network configuration +network: + config: disabled +{% endif %} + # The modules that run in the 'init' stage cloud_init_modules: - migrator @@ -133,7 +143,7 @@ cloud_final_modules: # (not accessible to handlers/transforms) system_info: # This will affect which distro class gets used -{% if variant in ["arch", "centos", "debian", "fedora", "freebsd", "rhel", "suse", "ubuntu"] %} +{% if variant in ["amazon", "arch", "centos", "debian", "fedora", "freebsd", "rhel", "suse", "ubuntu"] %} distro: {{ variant }} {% else %} # Unknown/fallback distro. @@ -181,12 +191,18 @@ system_info: primary: http://ports.ubuntu.com/ubuntu-ports security: http://ports.ubuntu.com/ubuntu-ports ssh_svcname: ssh -{% elif variant in ["arch", "centos", "fedora", "rhel", "suse"] %} +{% elif variant in ["amazon", "arch", "centos", "fedora", "rhel", "suse"] %} # Default user name + that default users groups (if added/used) default_user: +{% if variant == "amazon" %} + name: ec2-user + lock_passwd: True + gecos: EC2 Default User +{% else %} name: {{ variant }} lock_passwd: True gecos: {{ variant }} Cloud User +{% endif %} {% if variant == "suse" %} groups: [cdrom, users] {% elif variant == "arch" %} |