github.com/SUSE/skuba@v1.4.17/ci/infra/openstack/cloud-init/common.tpl (about)

     1  #cloud-config
     2  
     3  # set locale
     4  locale: en_US.UTF-8
     5  
     6  # set timezone
     7  timezone: Etc/UTC
     8  
     9  # Inject the public keys
    10  ssh_authorized_keys:
    11  ${authorized_keys}
    12  
    13  ntp:
    14    enabled: true
    15    ntp_client: chrony
    16    config:
    17      confpath: /etc/chrony.conf
    18    servers:
    19  ${ntp_servers}
    20  
    21  # need to disable gpg checks because the cloud image has an untrusted repo
    22  zypper:
    23    repos:
    24  ${repositories}
    25    config:
    26      gpgcheck: "off"
    27      solver.onlyRequires: "true"
    28      download.use_deltarpm: "true"
    29  
    30  # need to remove the standard docker packages that are pre-installed on the
    31  # cloud image because they conflict with the kubic- ones that are pulled by
    32  # the kubernetes packages
    33  # WARNING!!! Do not use cloud-init packages module when SUSE CaaSP Registraion
    34  # Code is provided. In this case repositories will be added in runcmd module 
    35  # with SUSEConnect command after packages module is ran
    36  #packages:
    37  
    38  bootcmd:
    39    - ip link set dev eth0 mtu 1400
    40  
    41  runcmd:
    42    # workaround for bsc#1119397 . If this is not called, /etc/resolv.conf is empty
    43    - netconfig -f update
    44    # Workaround for bsc#1138557 . Disable root and password SSH login
    45    - sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin no/' /etc/ssh/sshd_config
    46    - sed -i -e '/^#ChallengeResponseAuthentication/s/^.*$/ChallengeResponseAuthentication no/' /etc/ssh/sshd_config
    47    - sed -i -e '/^#PasswordAuthentication/s/^.*$/PasswordAuthentication no/' /etc/ssh/sshd_config
    48    - sshd -t || echo "ssh syntax failure"
    49    - systemctl restart sshd
    50  ${register_scc}
    51  ${register_rmt}
    52  ${commands}
    53  
    54  final_message: "The system is finally up, after $UPTIME seconds"