Note
This plugin is part of the community.general collection.
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.sorcery
.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
cache_valid_time integer | Time in seconds to invalidate grimoire collection on update especially useful for SCM and rsync grimoires makes sense only in pair with update_cache
| |
depends string | Comma-separated list of _optional_ dependencies to build a spell (or make sure it is built) with; use +/- in front of dependency to turn it on/off ('+' is optional though) this option is ignored if name parameter is equal to '*' or contains more than one spellproviders must be supplied in the form recognized by Sorcery, e.g. 'openssl(SSL)' | |
name list / elements=string | Name of the spell multiple names can be given, separated by commas special value '*' in conjunction with states latest or rebuild will update or rebuild the whole system respectivelyaliases: spell | |
state string |
| Whether to cast, dispel or rebuild a package state cast is an equivalent of present , not latest
state latest always triggers update_cache=yes
state rebuild implies cast of all specified spells, not only those existed before |
update boolean |
| Whether or not to update sorcery scripts at the very first stage |
update_cache boolean |
| Whether or not to update grimoire collection before casting spells aliases: update_codex |
Note
- 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: yes update_cache: yes - name: Refresh the grimoire collection if it is 1 day old using native sorcerous alias community.general.sorcery: update_codex: yes cache_valid_time: 86400 - name: Update only Sorcery itself community.general.sorcery: update: yes
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/general/sorcery_module.html