PeterMosmans / ansible-role-customize-gnome

Ansible role that customizes the GNOME desktop. It installs fonts and GNOME extensions from packages or zip files, copies files like desktop backgrounds and GNOME shell tweaks to a host, and modifies user settings.
GNU General Public License v3.0
74 stars 20 forks source link

Allow installing extensions via extension id #3

Closed SimonLammer closed 5 years ago

SimonLammer commented 5 years ago

The following configuration:

"gnome_extensions": [
    {
        "id": 15
    },
    {
        "id": 1160,
        "url": "testurl"
    },
    {
        "id": 1236,
        "name": "testname"
    },
    {
        "id": 1267,
        "name": "testname2",
        "url": "testurl2"
    }
]

will be prepared to:

"gnome_extensions": [
    {
        "id": 15,
        "name": "alternate-tab@gnome-shell-extensions.gcampax.github.com",
        "url": "https://extensions.gnome.org/download-extension/alternate-tab@gnome-shell-extensions.gcampax.github.com.shell-extension.zip?version_tag=8380"
    },
    {
        "id": 1160,
        "name": "dash-to-panel@jderose9.github.com",
        "url": "testurl"
    },
    {
        "id": 1236,
        "name": "testname",
        "url": "https://extensions.gnome.org/download-extension/noannoyance@sindex.com.shell-extension.zip?version_tag=7452"
    },
    {
        "id": 1267,
        "name": "testname2",
        "url": "testurl2"
    }
]

https://github.com/jaredhocutt/ansible-gnome-extensions has been an inspiration for this.

PeterMosmans commented 5 years ago

Thanks for the pull request @SimonLammer ! I'll be reviewing it

SimonLammer commented 5 years ago

https://github.com/PeterMosmans/ansible-role-customize-gnome/pull/3/files#diff-2444ad0870f91f17ca6c2a5e96b26823R70

- name: Use gnome_extensions_full
  set_fact:
    gnome_extensions: "{{ gnome_extensions_full }}"

could be removed, if we changed the original role's download & install mechanisms to use gnome_extensions_full (which could also be renamed) instead of gnome_extensions internally, but I left that out to create minimal changes.

PeterMosmans commented 5 years ago

Thanks @SimonLammer for all of your work on this, much appreciated! I'll bump the version number.