Skip to content

Commit

Permalink
Rename inventory.yaml to ansible-inventory.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
  • Loading branch information
afbjorklund committed May 8, 2024
1 parent a447985 commit 45ede80
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 35 deletions.
6 changes: 3 additions & 3 deletions pkg/start/ansible.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func runAnsibleProvision(ctx context.Context, inst *store.Instance) error {
}

func runAnsiblePlaybook(ctx context.Context, inst *store.Instance, playbook string) error {
inventory, err := createInventory(inst)
inventory, err := createAnsibleInventory(inst)
if err != nil {
return err
}
Expand All @@ -42,7 +42,7 @@ func runAnsiblePlaybook(ctx context.Context, inst *store.Instance, playbook stri
return cmd.Run()
}

func createInventory(inst *store.Instance) (string, error) {
func createAnsibleInventory(inst *store.Instance) (string, error) {
vars := map[string]interface{}{
"ansible_connection": "ssh",
"ansible_host": "lima-" + inst.Name,
Expand All @@ -61,6 +61,6 @@ func createInventory(inst *store.Instance) (string, error) {
if err != nil {
return "", err
}
inventory := filepath.Join(inst.Dir, filenames.InventoryYAML)
inventory := filepath.Join(inst.Dir, filenames.AnsibleInventoryYAML)
return inventory, os.WriteFile(inventory, bytes, 0o644)
}
62 changes: 31 additions & 31 deletions pkg/store/filenames/filenames.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,37 +26,37 @@ const (
// Filenames that may appear under an instance directory

const (
LimaYAML = "lima.yaml"
LimaVersion = "lima-version" // Lima version used to create instance
CIDataISO = "cidata.iso"
CIDataISODir = "cidata"
BaseDisk = "basedisk"
DiffDisk = "diffdisk"
Kernel = "kernel"
KernelCmdline = "kernel.cmdline"
Initrd = "initrd"
QMPSock = "qmp.sock"
SerialLog = "serial.log" // default serial (ttyS0, but ttyAMA0 on qemu-system-{arm,aarch64})
SerialSock = "serial.sock"
SerialPCILog = "serialp.log" // pci serial (ttyS0 on qemu-system-{arm,aarch64})
SerialPCISock = "serialp.sock"
SerialVirtioLog = "serialv.log" // virtio serial
SerialVirtioSock = "serialv.sock"
SSHSock = "ssh.sock"
SSHConfig = "ssh.config"
VhostSock = "virtiofsd-%d.sock"
VNCDisplayFile = "vncdisplay"
VNCPasswordFile = "vncpassword"
GuestAgentSock = "ga.sock"
VirtioPort = "io.lima-vm.guest_agent.0"
HostAgentPID = "ha.pid"
HostAgentSock = "ha.sock"
HostAgentStdoutLog = "ha.stdout.log"
HostAgentStderrLog = "ha.stderr.log"
VzIdentifier = "vz-identifier"
VzEfi = "vz-efi" // efi variable store
QemuEfiCodeFD = "qemu-efi-code.fd" // efi code; not always created
InventoryYAML = "inventory.yaml" // ansible inventory
LimaYAML = "lima.yaml"
LimaVersion = "lima-version" // Lima version used to create instance
CIDataISO = "cidata.iso"
CIDataISODir = "cidata"
BaseDisk = "basedisk"
DiffDisk = "diffdisk"
Kernel = "kernel"
KernelCmdline = "kernel.cmdline"
Initrd = "initrd"
QMPSock = "qmp.sock"
SerialLog = "serial.log" // default serial (ttyS0, but ttyAMA0 on qemu-system-{arm,aarch64})
SerialSock = "serial.sock"
SerialPCILog = "serialp.log" // pci serial (ttyS0 on qemu-system-{arm,aarch64})
SerialPCISock = "serialp.sock"
SerialVirtioLog = "serialv.log" // virtio serial
SerialVirtioSock = "serialv.sock"
SSHSock = "ssh.sock"
SSHConfig = "ssh.config"
VhostSock = "virtiofsd-%d.sock"
VNCDisplayFile = "vncdisplay"
VNCPasswordFile = "vncpassword"
GuestAgentSock = "ga.sock"
VirtioPort = "io.lima-vm.guest_agent.0"
HostAgentPID = "ha.pid"
HostAgentSock = "ha.sock"
HostAgentStdoutLog = "ha.stdout.log"
HostAgentStderrLog = "ha.stderr.log"
VzIdentifier = "vz-identifier"
VzEfi = "vz-efi" // efi variable store
QemuEfiCodeFD = "qemu-efi-code.fd" // efi code; not always created
AnsibleInventoryYAML = "ansible-inventory.yaml"

// SocketDir is the default location for forwarded sockets with a relative paths in HostSocket
SocketDir = "sock"
Expand Down
2 changes: 1 addition & 1 deletion website/content/en/docs/dev/Internals/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ cloud-init:
- `cidata.iso`: cloud-init ISO9660 image. See [`cidata.iso`](#cidataiso).

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

disk:
- `basedisk`: the base image
Expand Down

0 comments on commit 45ede80

Please sign in to comment.