Blame config/cloud.cfg.tmpl

Packit Service a04d08
## template:jinja
Packit Service a04d08
# The top level settings are used as module
Packit Service a04d08
# and system configuration.
Packit Service a04d08
Packit Service 9bfd13
{% if variant.endswith("bsd") %}
Packit Service a04d08
syslog_fix_perms: root:wheel
Packit Service a04d08
{% elif variant in ["suse"] %}
Packit Service a04d08
syslog_fix_perms: root:root
Packit Service a04d08
{% endif %}
Packit Service a04d08
# A set of users which may be applied and/or used by various modules
Packit Service a04d08
# when a 'default' entry is found it will reference the 'default_user'
Packit Service a04d08
# from the distro configuration specified below
Packit Service a04d08
users:
Packit Service a04d08
   - default
Packit Service a04d08
Packit Service a04d08
# If this is set, 'root' will not be able to ssh in and they
Packit Service a04d08
# will get a message to login instead as the default $user
Packit Service a04d08
{% if variant in ["freebsd"] %}
Packit Service a04d08
disable_root: false
Packit Service a04d08
{% else %}
Packit Service a04d08
disable_root: true
Packit Service a04d08
{% endif %}
Packit Service a04d08
Packit Service 9bfd13
{% if variant in ["alpine", "amazon", "centos", "fedora", "rhel"] %}
Packit Service a04d08
mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2']
Packit Service 9bfd13
{% if variant == "amazon" %}
Packit Service 9bfd13
resize_rootfs: noblock
Packit Service 9bfd13
{% endif %}
Packit Service a04d08
resize_rootfs_tmp: /dev
Packit Service a04d08
ssh_pwauth:   0
Packit Service a04d08
Packit Service a04d08
{% endif %}
Packit Service a04d08
# This will cause the set+update hostname module to not operate (if true)
Packit Service a04d08
preserve_hostname: false
Packit Service a04d08
Packit Service 9bfd13
{% if variant.endswith("bsd") %}
Packit Service a04d08
# This should not be required, but leave it in place until the real cause of
Packit Service a04d08
# not finding -any- datasources is resolved.
Packit Service a04d08
datasource_list: ['NoCloud', 'ConfigDrive', 'Azure', 'OpenStack', 'Ec2']
Packit Service a04d08
{% endif %}
Packit Service a04d08
# Example datasource config
Packit Service a04d08
# datasource:
Packit Service a04d08
#    Ec2:
Packit Service a04d08
#      metadata_urls: [ 'blah.com' ]
Packit Service a04d08
#      timeout: 5 # (defaults to 50 seconds)
Packit Service a04d08
#      max_wait: 10 # (defaults to 120 seconds)
Packit Service a04d08
Packit Service 9bfd13
Packit Service 9bfd13
{% if variant == "amazon" %}
Packit Service 9bfd13
# Amazon Linux relies on ec2-net-utils for network configuration
Packit Service 9bfd13
network:
Packit Service 9bfd13
  config: disabled
Packit Service 9bfd13
{% endif %}
Packit Service 9bfd13
Packit Service a04d08
# The modules that run in the 'init' stage
Packit Service a04d08
cloud_init_modules:
Packit Service a04d08
 - migrator
Packit Service 9bfd13
{% if variant not in ["netbsd"] %}
Packit Service a04d08
 - seed_random
Packit Service 9bfd13
{% endif %}
Packit Service a04d08
 - bootcmd
Packit Service a04d08
 - write-files
Packit Service 9bfd13
{% if variant not in ["netbsd"] %}
Packit Service a04d08
 - growpart
Packit Service a04d08
 - resizefs
Packit Service 9bfd13
{% endif %}
Packit Service 9bfd13
{% if variant not in ["freebsd", "netbsd"] %}
Packit Service a04d08
 - disk_setup
Packit Service a04d08
 - mounts
Packit Service a04d08
{% endif %}
Packit Service a04d08
 - set_hostname
Packit Service a04d08
 - update_hostname
Packit Service a04d08
 - update_etc_hosts
Packit Service 9bfd13
{% if variant in ["alpine"] %}
Packit Service 9bfd13
 - resolv_conf
Packit Service 9bfd13
{% endif %}
Packit Service 9bfd13
{% if not variant.endswith("bsd") %}
Packit Service a04d08
 - ca-certs
Packit Service a04d08
 - rsyslog
Packit Service a04d08
{% endif %}
Packit Service a04d08
 - users-groups
Packit Service a04d08
 - ssh
Packit Service a04d08
Packit Service a04d08
# The modules that run in the 'config' stage
Packit Service a04d08
cloud_config_modules:
Packit Service a04d08
{% if variant in ["ubuntu", "unknown", "debian"] %}
Packit Service a04d08
# Emit the cloud config ready event
Packit Service a04d08
# this can be used by upstart jobs for 'start on cloud-config'.
Packit Service a04d08
 - emit_upstart
Packit Service a04d08
 - snap
Packit Service a04d08
{% endif %}
Packit Service a04d08
 - ssh-import-id
Packit Service a04d08
 - locale
Packit Service a04d08
 - set-passwords
Packit Service a04d08
{% if variant in ["rhel", "fedora"] %}
Packit Service a04d08
 - spacewalk
Packit Service a04d08
 - yum-add-repo
Packit Service a04d08
{% endif %}
Packit Service a04d08
{% if variant in ["ubuntu", "unknown", "debian"] %}
Packit Service a04d08
 - grub-dpkg
Packit Service a04d08
 - apt-pipelining
Packit Service a04d08
 - apt-configure
Packit Service a04d08
{% endif %}
Packit Service a04d08
{% if variant in ["ubuntu"] %}
Packit Service a04d08
 - ubuntu-advantage
Packit Service a04d08
{% endif %}
Packit Service a04d08
{% if variant in ["suse"] %}
Packit Service a04d08
 - zypper-add-repo
Packit Service a04d08
{% endif %}
Packit Service 9bfd13
{% if variant in ["alpine"] %}
Packit Service 9bfd13
 - apk-configure
Packit Service 9bfd13
{% endif %}
Packit Service 9bfd13
{% if variant not in ["freebsd", "netbsd"] %}
Packit Service a04d08
 - ntp
Packit Service a04d08
{% endif %}
Packit Service a04d08
 - timezone
Packit Service a04d08
 - disable-ec2-metadata
Packit Service a04d08
 - runcmd
Packit Service a04d08
{% if variant in ["ubuntu", "unknown", "debian"] %}
Packit Service a04d08
 - byobu
Packit Service a04d08
{% endif %}
Packit Service a04d08
Packit Service a04d08
# The modules that run in the 'final' stage
Packit Service a04d08
cloud_final_modules:
Packit Service a04d08
 - package-update-upgrade-install
Packit Service a04d08
{% if variant in ["ubuntu", "unknown", "debian"] %}
Packit Service a04d08
 - fan
Packit Service a04d08
 - landscape
Packit Service a04d08
 - lxd
Packit Service a04d08
{% endif %}
Packit Service a04d08
{% if variant in ["ubuntu", "unknown"] %}
Packit Service a04d08
 - ubuntu-drivers
Packit Service a04d08
{% endif %}
Packit Service a04d08
 - puppet
Packit Service a04d08
 - chef
Packit Service a04d08
 - mcollective
Packit Service a04d08
 - salt-minion
Packit Service a04d08
 - rightscale_userdata
Packit Service a04d08
 - scripts-vendor
Packit Service a04d08
 - scripts-per-once
Packit Service a04d08
 - scripts-per-boot
Packit Service a04d08
 - scripts-per-instance
Packit Service a04d08
 - scripts-user
Packit Service a04d08
 - ssh-authkey-fingerprints
Packit Service a04d08
 - keys-to-console
Packit Service a04d08
 - phone-home
Packit Service a04d08
 - final-message
Packit Service a04d08
 - power-state-change
Packit Service a04d08
Packit Service a04d08
# System and/or distro specific settings
Packit Service a04d08
# (not accessible to handlers/transforms)
Packit Service a04d08
system_info:
Packit Service a04d08
   # This will affect which distro class gets used
Packit Service 9bfd13
{% if variant in ["alpine", "amazon", "arch", "centos", "debian",
Packit Service 9bfd13
                  "fedora", "freebsd", "netbsd", "openbsd", "rhel",
Packit Service 9bfd13
                  "suse", "ubuntu"] %}
Packit Service a04d08
   distro: {{ variant }}
Packit Service a04d08
{% else %}
Packit Service a04d08
   # Unknown/fallback distro.
Packit Service a04d08
   distro: ubuntu
Packit Service a04d08
{% endif %}
Packit Service a04d08
{% if variant in ["ubuntu", "unknown", "debian"] %}
Packit Service a04d08
   # Default user name + that default users groups (if added/used)
Packit Service a04d08
   default_user:
Packit Service a04d08
     name: ubuntu
Packit Service a04d08
     lock_passwd: True
Packit Service a04d08
     gecos: Ubuntu
Packit Service a04d08
     groups: [adm, audio, cdrom, dialout, dip, floppy, lxd, netdev, plugdev, sudo, video]
Packit Service a04d08
     sudo: ["ALL=(ALL) NOPASSWD:ALL"]
Packit Service a04d08
     shell: /bin/bash
Packit Service 9bfd13
{# SRU_BLOCKER: do not ship network renderers on Xenial, Bionic or Eoan #}
Packit Service 9bfd13
   network:
Packit Service 9bfd13
     renderers: ['netplan', 'eni', 'sysconfig']
Packit Service a04d08
   # Automatically discover the best ntp_client
Packit Service a04d08
   ntp_client: auto
Packit Service a04d08
   # Other config here will be given to the distro class and/or path classes
Packit Service a04d08
   paths:
Packit Service a04d08
      cloud_dir: /var/lib/cloud/
Packit Service a04d08
      templates_dir: /etc/cloud/templates/
Packit Service a04d08
      upstart_dir: /etc/init/
Packit Service a04d08
   package_mirrors:
Packit Service a04d08
     - arches: [i386, amd64]
Packit Service a04d08
       failsafe:
Packit Service a04d08
         primary: http://archive.ubuntu.com/ubuntu
Packit Service a04d08
         security: http://security.ubuntu.com/ubuntu
Packit Service a04d08
       search:
Packit Service a04d08
         primary:
Packit Service a04d08
           - http://%(ec2_region)s.ec2.archive.ubuntu.com/ubuntu/
Packit Service a04d08
           - http://%(availability_zone)s.clouds.archive.ubuntu.com/ubuntu/
Packit Service a04d08
           - http://%(region)s.clouds.archive.ubuntu.com/ubuntu/
Packit Service a04d08
         security: []
Packit Service a04d08
     - arches: [arm64, armel, armhf]
Packit Service a04d08
       failsafe:
Packit Service a04d08
         primary: http://ports.ubuntu.com/ubuntu-ports
Packit Service a04d08
         security: http://ports.ubuntu.com/ubuntu-ports
Packit Service a04d08
       search:
Packit Service a04d08
         primary:
Packit Service a04d08
           - http://%(ec2_region)s.ec2.ports.ubuntu.com/ubuntu-ports/
Packit Service a04d08
           - http://%(availability_zone)s.clouds.ports.ubuntu.com/ubuntu-ports/
Packit Service a04d08
           - http://%(region)s.clouds.ports.ubuntu.com/ubuntu-ports/
Packit Service a04d08
         security: []
Packit Service a04d08
     - arches: [default]
Packit Service a04d08
       failsafe:
Packit Service a04d08
         primary: http://ports.ubuntu.com/ubuntu-ports
Packit Service a04d08
         security: http://ports.ubuntu.com/ubuntu-ports
Packit Service a04d08
   ssh_svcname: ssh
Packit Service 9bfd13
{% elif variant in ["alpine", "amazon", "arch", "centos", "fedora",
Packit Service 9bfd13
                    "rhel", "suse"] %}
Packit Service a04d08
   # Default user name + that default users groups (if added/used)
Packit Service a04d08
   default_user:
Packit Service 9bfd13
{% if variant == "amazon" %}
Packit Service 9bfd13
     name: ec2-user
Packit Service 9bfd13
     lock_passwd: True
Packit Service 9bfd13
     gecos: EC2 Default User
Packit Service 9bfd13
{% else %}
Packit Service a04d08
     name: {{ variant }}
Packit Service a04d08
     lock_passwd: True
Packit Service a04d08
     gecos: {{ variant }} Cloud User
Packit Service 9bfd13
{% endif %}
Packit Service a04d08
{% if variant == "suse" %}
Packit Service a04d08
     groups: [cdrom, users]
Packit Service 9bfd13
{% elif variant == "alpine" %}
Packit Service 9bfd13
     groups: [adm, sudo]
Packit Service a04d08
{% elif variant == "arch" %}
Packit Service a04d08
     groups: [wheel, users]
Packit Service a04d08
{% else %}
Packit Service a04d08
     groups: [wheel, adm, systemd-journal]
Packit Service a04d08
{% endif %}
Packit Service a04d08
     sudo: ["ALL=(ALL) NOPASSWD:ALL"]
Packit Service 9bfd13
{% if variant == "alpine" %}
Packit Service 9bfd13
     shell: /bin/ash
Packit Service 9bfd13
{% else %}
Packit Service a04d08
     shell: /bin/bash
Packit Service 9bfd13
{% endif %}
Packit Service a04d08
   # Other config here will be given to the distro class and/or path classes
Packit Service a04d08
   paths:
Packit Service a04d08
      cloud_dir: /var/lib/cloud/
Packit Service a04d08
      templates_dir: /etc/cloud/templates/
Packit Service a04d08
   ssh_svcname: sshd
Packit Service a04d08
{% elif variant in ["freebsd"] %}
Packit Service a04d08
   # Default user name + that default users groups (if added/used)
Packit Service a04d08
   default_user:
Packit Service a04d08
     name: freebsd
Packit Service a04d08
     lock_passwd: True
Packit Service a04d08
     gecos: FreeBSD
Packit Service a04d08
     groups: [wheel]
Packit Service a04d08
     sudo: ["ALL=(ALL) NOPASSWD:ALL"]
Packit Service a04d08
     shell: /bin/tcsh
Packit Service 9bfd13
{% elif variant in ["netbsd"] %}
Packit Service 9bfd13
   default_user:
Packit Service 9bfd13
     name: netbsd
Packit Service 9bfd13
     lock_passwd: True
Packit Service 9bfd13
     gecos: NetBSD
Packit Service 9bfd13
     groups: [wheel]
Packit Service 9bfd13
     sudo: ["ALL=(ALL) NOPASSWD:ALL"]
Packit Service 9bfd13
     shell: /bin/sh
Packit Service 9bfd13
{% elif variant in ["openbsd"] %}
Packit Service 9bfd13
   default_user:
Packit Service 9bfd13
     name: openbsd
Packit Service 9bfd13
     lock_passwd: True
Packit Service 9bfd13
     gecos: OpenBSD
Packit Service 9bfd13
     groups: [wheel]
Packit Service 9bfd13
     sudo: ["ALL=(ALL) NOPASSWD:ALL"]
Packit Service 9bfd13
     shell: /bin/ksh
Packit Service 9bfd13
{% endif %}
Packit Service 9bfd13
{% if variant in ["freebsd", "netbsd", "openbsd"] %}
Packit Service 9bfd13
   network:
Packit Service 9bfd13
      renderers: ['{{ variant }}']
Packit Service a04d08
{% endif %}