Skip to content

Commit

Permalink
feat: add QEMU interpreter path and update README
Browse files Browse the repository at this point in the history
- Added `.vscode/settings.json` file with `ansible.python.interpreterPath` set to `/bin/python3`.
- Updated the `README.md` file to provide more information about QEMU and the `qemu-guest-agent`.

The changes in this commit improve the configuration of the project and enhance the documentation.
  • Loading branch information
dgibbs64 committed Jun 29, 2023
1 parent c8648b6 commit d946df8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ansible.python.interpreterPath": "/bin/python3"
}
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

An [Ansible](https://www.ansible.com) role that detects QEMU and installs qemu-guest-agent on Linux when required on a qemu virtual machine.

QEMU (Quick EMUlator) is a free and open-source emulator and virtualization software. Used by many popular virtualisation platforms such as [Proxmox](https://www.proxmox.com/en/), [VirtualBox](https://www.virtualbox.org/), [KVM](https://www.linux-kvm.org/page/Main_Page), [Xen](https://xenproject.org/), [OpenStack](https://www.openstack.org/) and more.

The `qemu-guest-agent` is a helper daemon, which is installed on the guest (virtual machine). It is used to exchange information between the host and guest, and to execute commands in the guest.

Packages installed:

<p align="center">
<a href="https://app.codacy.com/gh/dgibbs64/ansible-role-qemu_guest_agent"><img src="https://img.shields.io/codacy/grade/1a892d499efd4dabb73beffa8d64ed01?logo=codacy&style=flat-square" alt="Codacy grade"></a>
<a href="https://github.com/dgibbs64/ansible-role-qemu_guest_agent/actions/workflows/molecule.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/dgibbs64/ansible-role-qemu_guest_agent/molecule.yml?label=molecule&logo=ansible&style=flat-square"></a>
Expand All @@ -17,6 +11,12 @@ Packages installed:
<a href="https://github.com/dgibbs64/ansible-role-qemu_guest_agent/blob/main/LICENSE.md"><img src="https://img.shields.io/github/license/dgibbs64/ansible-role-qemu_guest_agent?style=flat-square" alt="MIT License"></a>
</p>

## About

QEMU (Quick EMUlator) is a free and open-source emulator and virtualization software. Used by many popular virtualisation platforms such as [Proxmox](https://www.proxmox.com/en/), [VirtualBox](https://www.virtualbox.org/), [KVM](https://www.linux-kvm.org/page/Main_Page), [Xen](https://xenproject.org/), [OpenStack](https://www.openstack.org/) and more.

The `qemu-guest-agent` is a helper daemon, which is installed on the guest (virtual machine). It is used to exchange information between the host and guest, and to execute commands in the guest.

## Requirements

None.
Expand Down
10 changes: 6 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
---
# tasks for qemu-guest-agent

- name: "Gather facts"
when: ansible_facts['ansible_os_family'] is not defined or ansible_facts['ansible_system_vendor'] is not defined
ansible.builtin.setup:
when: ansible_facts|default({}) == {}

- name: "Update apt cache (Debian Family)"
when: ansible_os_family == "Debian"
ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600
when: ansible_os_family == "Debian"

- name: "Install qemu_guest_agent"
when: ansible_system_vendor == 'QEMU'
- name: "Ensure qemu_guest_agent is installed"
ansible.builtin.package:
name: qemu-guest-agent
state: present
when: ansible_system_vendor == 'QEMU'

0 comments on commit d946df8

Please sign in to comment.