mirror of
https://github.com/clearlinux/micro-config-drive.git
synced 2026-06-16 02:25:51 +00:00
9644cbdc5d
This option allows users to suspend execution of the cloud-init provisioning until a valid network is detected. This detection is currently done through requesting a DNS lookup for one of the Clear Linux NTP service IP addresses (this is a RR record, we don't actually look at the result). This lookup is not infinite. After 5 minutes, the wait exits no matter what even if there is no network detected. The option can be provided manually. `packages` and `package_upgrade` options *imply* this option, but one can explicitly disable the wait by providing it early in the cloud-config file with a value of `false`. The wait routing is active - it will retry relatively quickly to detect an active connection. Any failure will result in another retry. In a fully private network without public DNS, this will not work. The DNS hostname used for testing can be manipulated through the `-with-dnstestaddr=<hostname>` configure flag. You shouldn't put an IP address in here, since that fully disables any network testing.
66 lines
1.7 KiB
YAML
66 lines
1.7 KiB
YAML
#cloud-config
|
|
package_upgrade: true
|
|
package_upgrade: false
|
|
wait_for_network: false
|
|
wait_for_network: true
|
|
apt_upgrade: false
|
|
write_files:
|
|
-
|
|
content: |
|
|
A test file
|
|
path: /tmp/cloud-init-test-1
|
|
owner: nobody.nogroup
|
|
permissions: 0644
|
|
-
|
|
content: |
|
|
Another test file
|
|
path: /tmp/cloud-init-test-2
|
|
owner: root.root
|
|
permissions: 0600
|
|
packages:
|
|
- openstack-configure
|
|
- perl-basic
|
|
- os-core-dev
|
|
- [kernel-kvm, kvm-host]
|
|
groups:
|
|
- cloud-init: [nobody, games]
|
|
runcmd:
|
|
- [ ls, -l, / ]
|
|
- [ sh, -xc, "echo $(date) ': hello world!'" ]
|
|
- [ sh, -c, echo "=========hello world'=========" ]
|
|
- ls -l /root
|
|
- [ wget, "http://slashdot.org", -O, /tmp/index.html ]
|
|
users:
|
|
- name: foobar
|
|
gecos: Foo B. Bar
|
|
homedir: /home/foobar
|
|
primary-group: foobar
|
|
groups: users
|
|
selinux-user: staff_u
|
|
lock-passwd: false
|
|
ssh-import-id: foobar
|
|
inactive: true
|
|
passwd: $6$j212wezy$7H/1LT4f9/N3wpgNunhsIqtMj62OKiS3nyNwuizouQc3u7MbYCarYeAHWYPYb2FT.lbioDm2RrkJPb9BZMN1O/
|
|
no-create-home: true
|
|
no-user-group: true
|
|
no-log-init: true
|
|
expiredate: 2015-12-31
|
|
ssh-authorized-keys:
|
|
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmHRP+1o+vBSg+ej714Y3iO5Osbr29dHL/WZQlsj
|
|
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9GNA2I6IU+II1qoKP1Ttn/eNv8zquEDNii+EA5m
|
|
sudo:
|
|
- [ "ALL=(ALL) NOPASSWD:ALL", "ALL=(ALL) NOPASSWD:/bin/mysql" ]
|
|
- ALL=(ALL) NOPASSWD:ALL
|
|
system: true
|
|
ssh_authorized_keys:
|
|
- ssh-rsa BBBBB3NzaC1yc2EAAAADAQABAAABAQDmHRP+0000000000000000000000000000000000
|
|
- ssh-rsa BBBBB3NzaC1yc2EAAAADAQABAAABAQC9GNA21111111111111111111111111111111111
|
|
service:
|
|
- start: dbus0
|
|
- start: [ foo1, bar2 ]
|
|
- stop:
|
|
- foo3
|
|
- bar4
|
|
- [ foo5, bar6 ]
|
|
hostname: "localhost"
|