community.general.pear – Manage pear/pecl packages¶
Note
This plugin is part of the community.general collection (version 2.5.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.pear
.
Parameters¶
Examples¶
- name: Install pear package
community.general.pear:
name: Net_URL2
state: present
- name: Install pecl package
community.general.pear:
name: pecl/json_post
state: present
- name: Install pecl package with expected prompt
community.general.pear:
name: pecl/apcu
state: present
prompts:
- (.*)Enable internal debugging in APCu \[no\]
- name: Install pecl package with expected prompt and an answer
community.general.pear:
name: pecl/apcu
state: present
prompts:
- (.*)Enable internal debugging in APCu \[no\]: "yes"
- name: Install multiple pear/pecl packages at once with prompts.
Prompts will be processed on the same order as the packages order.
If there is more prompts than packages, packages without prompts will be installed without any prompt expected.
If there is more packages than prompts, additionnal prompts will be ignored.
community.general.pear:
name: pecl/gnupg, pecl/apcu
state: present
prompts:
- I am a test prompt because gnupg doesnt asks anything
- (.*)Enable internal debugging in APCu \[no\]: "yes"
- name: Install multiple pear/pecl packages at once skipping the first prompt.
Prompts will be processed on the same order as the packages order.
If there is more prompts than packages, packages without prompts will be installed without any prompt expected.
If there is more packages than prompts, additionnal prompts will be ignored.
community.general.pear:
name: pecl/gnupg, pecl/apcu
state: present
prompts:
- null
- (.*)Enable internal debugging in APCu \[no\]: "yes"
- name: Upgrade package
community.general.pear:
name: Net_URL2
state: latest
- name: Remove packages
community.general.pear:
name: Net_URL2,pecl/json_post
state: absent
Authors¶
Jonathan Lestrelin (@jle64) <jonathan.lestrelin@gmail.com>