Skip to content

Commit 45ede80

Browse files
committed
Rename inventory.yaml to ansible-inventory.yaml
Signed-off-by: Anders F Björklund <[email protected]>
1 parent a447985 commit 45ede80

File tree

3 files changed

+35
-35
lines changed

3 files changed

+35
-35
lines changed

pkg/start/ansible.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func runAnsibleProvision(ctx context.Context, inst *store.Instance) error {
3030
}
3131

3232
func runAnsiblePlaybook(ctx context.Context, inst *store.Instance, playbook string) error {
33-
inventory, err := createInventory(inst)
33+
inventory, err := createAnsibleInventory(inst)
3434
if err != nil {
3535
return err
3636
}
@@ -42,7 +42,7 @@ func runAnsiblePlaybook(ctx context.Context, inst *store.Instance, playbook stri
4242
return cmd.Run()
4343
}
4444

45-
func createInventory(inst *store.Instance) (string, error) {
45+
func createAnsibleInventory(inst *store.Instance) (string, error) {
4646
vars := map[string]interface{}{
4747
"ansible_connection": "ssh",
4848
"ansible_host": "lima-" + inst.Name,
@@ -61,6 +61,6 @@ func createInventory(inst *store.Instance) (string, error) {
6161
if err != nil {
6262
return "", err
6363
}
64-
inventory := filepath.Join(inst.Dir, filenames.InventoryYAML)
64+
inventory := filepath.Join(inst.Dir, filenames.AnsibleInventoryYAML)
6565
return inventory, os.WriteFile(inventory, bytes, 0o644)
6666
}

pkg/store/filenames/filenames.go

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,37 @@ const (
2626
// Filenames that may appear under an instance directory
2727

2828
const (
29-
LimaYAML = "lima.yaml"
30-
LimaVersion = "lima-version" // Lima version used to create instance
31-
CIDataISO = "cidata.iso"
32-
CIDataISODir = "cidata"
33-
BaseDisk = "basedisk"
34-
DiffDisk = "diffdisk"
35-
Kernel = "kernel"
36-
KernelCmdline = "kernel.cmdline"
37-
Initrd = "initrd"
38-
QMPSock = "qmp.sock"
39-
SerialLog = "serial.log" // default serial (ttyS0, but ttyAMA0 on qemu-system-{arm,aarch64})
40-
SerialSock = "serial.sock"
41-
SerialPCILog = "serialp.log" // pci serial (ttyS0 on qemu-system-{arm,aarch64})
42-
SerialPCISock = "serialp.sock"
43-
SerialVirtioLog = "serialv.log" // virtio serial
44-
SerialVirtioSock = "serialv.sock"
45-
SSHSock = "ssh.sock"
46-
SSHConfig = "ssh.config"
47-
VhostSock = "virtiofsd-%d.sock"
48-
VNCDisplayFile = "vncdisplay"
49-
VNCPasswordFile = "vncpassword"
50-
GuestAgentSock = "ga.sock"
51-
VirtioPort = "io.lima-vm.guest_agent.0"
52-
HostAgentPID = "ha.pid"
53-
HostAgentSock = "ha.sock"
54-
HostAgentStdoutLog = "ha.stdout.log"
55-
HostAgentStderrLog = "ha.stderr.log"
56-
VzIdentifier = "vz-identifier"
57-
VzEfi = "vz-efi" // efi variable store
58-
QemuEfiCodeFD = "qemu-efi-code.fd" // efi code; not always created
59-
InventoryYAML = "inventory.yaml" // ansible inventory
29+
LimaYAML = "lima.yaml"
30+
LimaVersion = "lima-version" // Lima version used to create instance
31+
CIDataISO = "cidata.iso"
32+
CIDataISODir = "cidata"
33+
BaseDisk = "basedisk"
34+
DiffDisk = "diffdisk"
35+
Kernel = "kernel"
36+
KernelCmdline = "kernel.cmdline"
37+
Initrd = "initrd"
38+
QMPSock = "qmp.sock"
39+
SerialLog = "serial.log" // default serial (ttyS0, but ttyAMA0 on qemu-system-{arm,aarch64})
40+
SerialSock = "serial.sock"
41+
SerialPCILog = "serialp.log" // pci serial (ttyS0 on qemu-system-{arm,aarch64})
42+
SerialPCISock = "serialp.sock"
43+
SerialVirtioLog = "serialv.log" // virtio serial
44+
SerialVirtioSock = "serialv.sock"
45+
SSHSock = "ssh.sock"
46+
SSHConfig = "ssh.config"
47+
VhostSock = "virtiofsd-%d.sock"
48+
VNCDisplayFile = "vncdisplay"
49+
VNCPasswordFile = "vncpassword"
50+
GuestAgentSock = "ga.sock"
51+
VirtioPort = "io.lima-vm.guest_agent.0"
52+
HostAgentPID = "ha.pid"
53+
HostAgentSock = "ha.sock"
54+
HostAgentStdoutLog = "ha.stdout.log"
55+
HostAgentStderrLog = "ha.stderr.log"
56+
VzIdentifier = "vz-identifier"
57+
VzEfi = "vz-efi" // efi variable store
58+
QemuEfiCodeFD = "qemu-efi-code.fd" // efi code; not always created
59+
AnsibleInventoryYAML = "ansible-inventory.yaml"
6060

6161
// SocketDir is the default location for forwarded sockets with a relative paths in HostSocket
6262
SocketDir = "sock"

website/content/en/docs/dev/Internals/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ cloud-init:
3838
- `cidata.iso`: cloud-init ISO9660 image. See [`cidata.iso`](#cidataiso).
3939

4040
Ansible:
41-
- `inventory.yaml`: the Ansible node inventory. See [ansible](#ansible).
41+
- `ansible-inventory.yaml`: the Ansible node inventory. See [ansible](#ansible).
4242

4343
disk:
4444
- `basedisk`: the base image

0 commit comments

Comments
 (0)