Skip to content

openvm-tools Ansible Role

An Ansible role to install, configure, and manage openvm-tools on Debian-based systems.

Features

  • Installs open-vm-tools and/or open-vm-tools-desktop on debian systems
  • Uninstalls open-vm-tools and/or open-vm-tools-desktop on debian systems

Installation

First add the following line to your requirements.yml file:

roles:
  - name: openvm-tools
    src: https://gitlab.com/niclas-zone/tools/ansible/roles/openvm-tools.git
    version: main
    scm: git

After that, install the role by executing the following command:

ansible-galaxy install -r requirements.yml --force

Role Variables

Variable Default Value Type Description
openvm_tools_state present string Desired package state for open-vm-tools (present or absent)
openvm_tools_desktop_state absent string Desired package state for open-vm-tools-desktop (present or absent)
openvm_tools_packages ['open-vm-tools'] list Packages needed for openvm-tools
openvm_tools_desktop_packages ['open-vm-tools-desktop'] list Packages needed for openvm-tools-desktop
ansible_managed_warning "This file is managed by Ansible. Manual changes will be overwritten." string Warning text included in Ansible-managed files
ansible_role_repository https://gitlab.com/niclas-zone/tools/ansible/roles/openvm-tools string Repository link where the role is maintained

Example Playbooks

Basic Installation

---
- hosts: all
  become: true
  roles:
    - role: openvm-tools
      vars:
        openvm_tools_state: present

Install with Desktop Tools

---
- hosts: all
  become: true
  roles:
    - role: openvm-tools
      vars:
        openvm_tools_state: present
        openvm_tools_desktop_state: present

Uninstall a Package

---
- hosts: all
  become: true
  roles:
    - role: openvm-tools
      vars:
        openvm_tools_state: absent