shipilovds.workstation.gnome_extension (1.1.0) — module

Gnome shell extensions management

| "added in version" 1.0.0 of shipilovds.workstation"

Authors: Denis Shipilov (@shipilovds)

Install collection

Install with ansible-galaxy collection install shipilovds.workstation:==1.1.0


Add to requirements.yml

  collections:
    - name: shipilovds.workstation
      version: 1.1.0

Description

This module can install or enable/disable gnome shell extensions

You can install and then enable module by one task (use both arguments)

You need to reload Gnome Session to make extension enabled.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure that extension is disabled
  gnome_extension:
    name: "user-theme@gnome-shell-extensions.gcampax.github.com"
    enabled: False
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure that extension is uninstalled
  gnome_extension:
    name: "arcmenu@arcmenu.com"
    src: 'https://extensions.gnome.org/extension-data/arcmenuarcmenu.com.v6.shell-extension.zip'
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure that extension is installed and enabled
  gnome_extension:
    name: "night-light-slider.timurlinux.com"
    src: 'https://extensions.gnome.org/extension-data/night-light-slider.timurlinux.com.v19.shell-extension.zip'
    enabled: True
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# And there is a way for a many:
- set_fact:
    gnome_extensions:
      - name: 'dash-to-panel@jderose9.github.com'
        enabled: True
        url: 'https://extensions.gnome.org/extension-data/dash-to-paneljderose9.github.com.v40.shell-extension.zip'
      - name: 'openweather-extension@jenslody.de'
        state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: 'Gnome Extensions : Install and Setup'
  shipilovds.workstation.gnome_extension:
    name: "{{ item.name }}"
    src: "{{ item.url | default(omit) }}"
    enabled: "{{ item.enabled | default(omit) }}"
    state: "{{ item.state | default(omit) }}"
    force: True
  loop: "{{ gnome_extensions }}"
  loop_control:
    label: "{{ item['name'].split('@')[0] }}"

Inputs

    
src:
    description:
    - Module file path or URL (to zip file)
    required: false
    type: path

name:
    description:
    - Extension name (uuid)
    required: true
    type: str

force:
    default: false
    description:
    - Force module installation
    required: false
    type: bool

state:
    choices:
    - present
    - absent
    default: present
    description:
    - State of installation in the system
    required: false
    type: str

enabled:
    description:
    - Enable module when true / disable when false
    - Changes nothing if not set
    required: false
    type: bool