2020-03-21 00:10:22 +01:00
|
|
|
ignition = tf.provider("ignition", "1.1.0")
|
2019-06-27 00:27:39 +02:00
|
|
|
|
2019-07-05 03:43:25 +02:00
|
|
|
user = ignition.data.user()
|
2019-06-27 00:27:39 +02:00
|
|
|
user.name = "foo"
|
|
|
|
user.uid = 42
|
|
|
|
user.groups = ["foo", "bar"]
|
|
|
|
user.system = True
|
|
|
|
|
2019-07-05 03:43:25 +02:00
|
|
|
disk = ignition.data.disk()
|
2019-06-27 00:27:39 +02:00
|
|
|
disk.device = "/dev/sda"
|
|
|
|
|
2019-07-05 03:43:25 +02:00
|
|
|
root = disk.partition()
|
2019-06-27 00:27:39 +02:00
|
|
|
root.start = 2048
|
2019-07-12 03:32:28 +02:00
|
|
|
root.size = 4 * 1024 * 1024
|
2019-06-27 00:27:39 +02:00
|
|
|
|
2019-07-05 03:43:25 +02:00
|
|
|
home = disk.partition()
|
2019-07-12 03:32:28 +02:00
|
|
|
home.start = root.size + root.start
|
|
|
|
home.size = 4 * 1024 * 1024
|
|
|
|
|
|
|
|
ignition.data.config(disks=[disk.id], users=[user.id])
|
|
|
|
|
2019-07-08 00:28:42 +02:00
|
|
|
|