community / community.general / 8.5.0 / module / sorcery Package manager for Source Mage GNU/Linux Authors: Vlad Glagolev (@vaygr)community.general.sorcery (8.5.0) — module
Install with ansible-galaxy collection install community.general:==8.5.0
collections: - name: community.general version: 8.5.0
Manages "spells" on Source Mage GNU/Linux using I(sorcery) toolchain
- name: Make sure spell foo is installed community.general.sorcery: spell: foo state: present
- name: Make sure spells foo, bar and baz are removed community.general.sorcery: spell: foo,bar,baz state: absent
- name: Make sure spell foo with dependencies bar and baz is installed community.general.sorcery: spell: foo depends: bar,baz state: present
- name: Make sure spell foo with bar and without baz dependencies is installed community.general.sorcery: spell: foo depends: +bar,-baz state: present
- name: Make sure spell foo with libressl (providing SSL) dependency is installed community.general.sorcery: spell: foo depends: libressl(SSL) state: present
- name: Make sure spells with/without required dependencies (if any) are installed community.general.sorcery: name: "{{ item.spell }}" depends: "{{ item.depends | default(None) }}" state: present loop: - { spell: 'vifm', depends: '+file,-gtk+2' } - { spell: 'fwknop', depends: 'gpgme' } - { spell: 'pv,tnftp,tor' }
- name: Install the latest version of spell foo using regular glossary community.general.sorcery: name: foo state: latest
- name: Rebuild spell foo community.general.sorcery: spell: foo state: rebuild
- name: Rebuild the whole system, but update Sorcery and Codex first community.general.sorcery: spell: '*' state: rebuild update: true update_cache: true
- name: Refresh the grimoire collection if it is 1 day old using native sorcerous alias community.general.sorcery: update_codex: true cache_valid_time: 86400
- name: Make sure stable grimoire is present community.general.sorcery: name: stable repository: '*' state: present
- name: Make sure binary and stable-rc grimoires are removed community.general.sorcery: grimoire: binary,stable-rc repository: '*' state: absent
- name: Make sure games grimoire is pulled from rsync community.general.sorcery: grimoire: games repository: "rsync://download.sourcemage.org::codex/games" state: present
- name: Make sure a specific branch of stable grimoire is pulled from git community.general.sorcery: grimoire: stable.git repository: "git://download.sourcemage.org/smgl/grimoire.git:stable.git:stable-0.62" state: present
- name: Update only Sorcery itself community.general.sorcery: update: true
name: aliases: - spell - grimoire description: - Name of the spell or grimoire. - Multiple names can be given, separated by commas. - Special value V(*) in conjunction with states V(latest) or V(rebuild) will update or rebuild the whole system respectively - The alias O(grimoire) was added in community.general 7.3.0. elements: str type: list state: choices: - present - latest - absent - cast - dispelled - rebuild default: present description: - Whether to cast, dispel or rebuild a package. - State V(cast) is an equivalent of V(present), not V(latest). - State V(rebuild) implies cast of all specified spells, not only those existed before. type: str update: default: false description: - Whether or not to update sorcery scripts at the very first stage. type: bool depends: description: - Comma-separated list of _optional_ dependencies to build a spell (or make sure it is built) with; use V(+)/V(-) in front of dependency to turn it on/off (V(+) is optional though). - This option is ignored if O(name) parameter is equal to V(*) or contains more than one spell. - Providers must be supplied in the form recognized by Sorcery, for example 'V(openssl(SSL\))'. type: str repository: description: - Repository location. - If specified, O(name) represents grimoire(s) instead of spell(s). - Special value V(*) will pull grimoire from the official location. - Only single item in O(name) in conjunction with V(*) can be used. - O(state=absent) must be used with a special value V(*). type: str version_added: 7.3.0 version_added_collection: community.general update_cache: aliases: - update_codex default: false description: - Whether or not to update grimoire collection before casting spells. type: bool cache_valid_time: default: 0 description: - Time in seconds to invalidate grimoire collection on update. - Especially useful for SCM and rsync grimoires. - Makes sense only in pair with O(update_cache). type: int