|
10 | 10 | __metaclass__ = type
|
11 | 11 |
|
12 | 12 |
|
13 |
| -DOCUMENTATION = ''' |
14 |
| ---- |
| 13 | +DOCUMENTATION = r""" |
15 | 14 | module: xbps
|
16 | 15 | short_description: Manage packages with XBPS
|
17 | 16 | description:
|
18 |
| - - Manage packages with the XBPS package manager. |
| 17 | + - Manage packages with the XBPS package manager. |
19 | 18 | author:
|
20 |
| - - "Dino Occhialini (@dinoocch)" |
21 |
| - - "Michael Aldridge (@the-maldridge)" |
| 19 | + - "Dino Occhialini (@dinoocch)" |
| 20 | + - "Michael Aldridge (@the-maldridge)" |
22 | 21 | extends_documentation_fragment:
|
23 |
| - - community.general.attributes |
| 22 | + - community.general.attributes |
24 | 23 | attributes:
|
25 |
| - check_mode: |
26 |
| - support: full |
27 |
| - diff_mode: |
28 |
| - support: none |
| 24 | + check_mode: |
| 25 | + support: full |
| 26 | + diff_mode: |
| 27 | + support: none |
29 | 28 | options:
|
30 |
| - name: |
31 |
| - description: |
32 |
| - - Name of the package to install, upgrade, or remove. |
33 |
| - aliases: [pkg,package] |
34 |
| - type: list |
35 |
| - elements: str |
36 |
| - state: |
37 |
| - description: |
38 |
| - - Desired state of the package. |
39 |
| - default: "present" |
40 |
| - choices: ["present", "absent", "latest", "installed", "removed"] |
41 |
| - type: str |
42 |
| - recurse: |
43 |
| - description: |
44 |
| - - When removing a package, also remove its dependencies, provided |
45 |
| - that they are not required by other packages and were not |
46 |
| - explicitly installed by a user. |
47 |
| - type: bool |
48 |
| - default: false |
49 |
| - update_cache: |
50 |
| - description: |
51 |
| - - Whether or not to refresh the master package lists. This can be |
52 |
| - run as part of a package installation or as a separate step. |
53 |
| - type: bool |
54 |
| - default: true |
55 |
| - upgrade: |
56 |
| - description: |
57 |
| - - Whether or not to upgrade whole system |
58 |
| - type: bool |
59 |
| - default: false |
60 |
| - upgrade_xbps: |
61 |
| - description: |
62 |
| - - Whether or not to upgrade the xbps package when necessary. |
63 |
| - Before installing new packages, |
64 |
| - xbps requires the user to update the xbps package itself. |
65 |
| - Thus when this option is set to V(false), |
66 |
| - upgrades and installations will fail when xbps is not up to date. |
67 |
| - type: bool |
68 |
| - default: true |
69 |
| - version_added: '0.2.0' |
70 |
| - root: |
71 |
| - description: |
72 |
| - - The full path for the target root directory. |
73 |
| - type: path |
74 |
| - version_added: '10.2.0' |
75 |
| - repositories: |
76 |
| - description: |
77 |
| - - Repository URL(s) to prepend to the repository list for the |
78 |
| - package installation. |
79 |
| - The URL can be a URL to a repository for |
80 |
| - remote repositories or a path for local repositories. |
81 |
| - type: list |
82 |
| - elements: str |
83 |
| - version_added: '10.2.0' |
84 |
| - accept_pubkey: |
85 |
| - description: |
86 |
| - - Whether or not repository signing keys should be automatically accepted. |
87 |
| - type: bool |
88 |
| - default: false |
89 |
| - version_added: '10.2.0' |
90 |
| -''' |
91 |
| - |
92 |
| -EXAMPLES = ''' |
| 29 | + name: |
| 30 | + description: |
| 31 | + - Name of the package to install, upgrade, or remove. |
| 32 | + aliases: [pkg, package] |
| 33 | + type: list |
| 34 | + elements: str |
| 35 | + state: |
| 36 | + description: |
| 37 | + - Desired state of the package. |
| 38 | + default: "present" |
| 39 | + choices: ["present", "absent", "latest", "installed", "removed"] |
| 40 | + type: str |
| 41 | + recurse: |
| 42 | + description: |
| 43 | + - When removing a package, also remove its dependencies, provided that they are not required by other packages and were not explicitly installed |
| 44 | + by a user. |
| 45 | + type: bool |
| 46 | + default: false |
| 47 | + update_cache: |
| 48 | + description: |
| 49 | + - Whether or not to refresh the master package lists. This can be run as part of a package installation or as a separate step. |
| 50 | + type: bool |
| 51 | + default: true |
| 52 | + upgrade: |
| 53 | + description: |
| 54 | + - Whether or not to upgrade whole system. |
| 55 | + type: bool |
| 56 | + default: false |
| 57 | + upgrade_xbps: |
| 58 | + description: |
| 59 | + - Whether or not to upgrade the xbps package when necessary. Before installing new packages, xbps requires the user to update the xbps package |
| 60 | + itself. Thus when this option is set to V(false), upgrades and installations will fail when xbps is not up to date. |
| 61 | + type: bool |
| 62 | + default: true |
| 63 | + version_added: '0.2.0' |
| 64 | + root: |
| 65 | + description: |
| 66 | + - The full path for the target root directory. |
| 67 | + type: path |
| 68 | + version_added: '10.2.0' |
| 69 | + repositories: |
| 70 | + description: |
| 71 | + - Repository URL(s) to prepend to the repository list for the package installation. The URL can be a URL to a repository for remote repositories |
| 72 | + or a path for local repositories. |
| 73 | + type: list |
| 74 | + elements: str |
| 75 | + version_added: '10.2.0' |
| 76 | + accept_pubkey: |
| 77 | + description: |
| 78 | + - Whether or not repository signing keys should be automatically accepted. |
| 79 | + type: bool |
| 80 | + default: false |
| 81 | + version_added: '10.2.0' |
| 82 | +""" |
| 83 | + |
| 84 | +EXAMPLES = r""" |
93 | 85 | - name: Install package foo (automatically updating the xbps package if needed)
|
94 | 86 | community.general.xbps:
|
95 | 87 | name: foo
|
|
151 | 143 | state: present
|
152 | 144 | repositories: https://repo-default.voidlinux.org/current
|
153 | 145 | root: /mnt
|
154 |
| -''' |
| 146 | +""" |
155 | 147 |
|
156 |
| -RETURN = ''' |
| 148 | +RETURN = r""" |
157 | 149 | msg:
|
158 |
| - description: Message about results |
159 |
| - returned: success |
160 |
| - type: str |
161 |
| - sample: "System Upgraded" |
| 150 | + description: Message about results. |
| 151 | + returned: success |
| 152 | + type: str |
| 153 | + sample: "System Upgraded" |
162 | 154 | packages:
|
163 |
| - description: Packages that are affected/would be affected |
164 |
| - type: list |
165 |
| - sample: ["ansible"] |
166 |
| - returned: success |
167 |
| -''' |
| 155 | + description: Packages that are affected/would be affected. |
| 156 | + type: list |
| 157 | + sample: ["ansible"] |
| 158 | + returned: success |
| 159 | +""" |
168 | 160 |
|
169 | 161 |
|
170 | 162 | import os
|
|
0 commit comments