init
This commit is contained in:
commit
c5cd492449
475 changed files with 27928 additions and 0 deletions
30
technology/tools/Ansible/modules/ansible.builtin.package.md
Normal file
30
technology/tools/Ansible/modules/ansible.builtin.package.md
Normal file
|
@ -0,0 +1,30 @@
|
|||
# ansible.builtin.package
|
||||
Generic OS package manager
|
||||
|
||||
## Parameter
|
||||
| Parameter | Type | Default | Description |
|
||||
| --------- | --------------------- | ------- | ------------------------------------------------ |
|
||||
| **name** | string / required | - | Package name, or package specifier with version. |
|
||||
| **state** | "absent"<br>"present" | - | Whether to install, or remove a package. |
|
||||
| | | | |
|
||||
|
||||
## Examples
|
||||
```yaml
|
||||
- name: Install ntpdate
|
||||
ansible.builtin.package:
|
||||
name: ntpdate
|
||||
state: present
|
||||
|
||||
# This uses a variable as this changes per distribution.
|
||||
- name: Remove the apache package
|
||||
ansible.builtin.package:
|
||||
name: "{{ apache }}"
|
||||
state: absent
|
||||
|
||||
- name: Install the latest version of Apache and MariaDB
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- httpd
|
||||
- mariadb-server
|
||||
state: latest
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue