1 | <?php |
||
19 | final class AnsibleGalaxy extends AbstractAnsibleCommand implements AnsibleGalaxyInterface |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * Executes a command process. |
||
24 | * Returns either exitcode or string output if no callback is given. |
||
25 | * |
||
26 | * @param null $callback |
||
27 | * @return integer|string |
||
28 | */ |
||
29 | public function execute($callback = null) |
||
33 | |||
34 | /** |
||
35 | * Initialize a new role with base structure. |
||
36 | * |
||
37 | * @param string $roleName |
||
38 | * @return AnsibleGalaxyInterface |
||
39 | */ |
||
40 | public function init(string $roleName): AnsibleGalaxyInterface |
||
48 | |||
49 | /** |
||
50 | * @param string $role |
||
51 | * @param string $version |
||
52 | * @return AnsibleGalaxyInterface |
||
53 | */ |
||
54 | public function info(string $role, string $version = ''): AnsibleGalaxyInterface |
||
66 | |||
67 | /** |
||
68 | * Install packages. |
||
69 | * |
||
70 | * If you are unsure whether the role(s) is already installed, |
||
71 | * either check first or use the "force" option. |
||
72 | * |
||
73 | * @param string|array $roles role_name(s)[,version] | scm+role_repo_url[,version] |
||
74 | * @return AnsibleGalaxyInterface |
||
75 | */ |
||
76 | public function install($roles = ''): AnsibleGalaxyInterface |
||
88 | |||
89 | /** |
||
90 | * Get a list of installed modules. |
||
91 | * |
||
92 | * @param string $roleName |
||
93 | * @return AnsibleGalaxyInterface |
||
94 | */ |
||
95 | public function modulelist(string $roleName = ''): AnsibleGalaxyInterface |
||
105 | |||
106 | /** |
||
107 | * Add package(s) |
||
108 | * |
||
109 | * @param string|array $roles |
||
110 | * @return AnsibleGalaxyInterface |
||
111 | */ |
||
112 | public function remove($roles = ''): AnsibleGalaxyInterface |
||
122 | |||
123 | /** |
||
124 | * Show general or specific help. |
||
125 | * |
||
126 | * @return AnsibleGalaxyInterface |
||
127 | */ |
||
128 | public function help(): AnsibleGalaxyInterface |
||
134 | |||
135 | /** |
||
136 | * The path in which the skeleton role will be created. |
||
137 | * The default is the current working directory. |
||
138 | * |
||
139 | * @param string $path |
||
140 | * @return AnsibleGalaxyInterface |
||
141 | */ |
||
142 | public function initPath(string $path = ''): AnsibleGalaxyInterface |
||
148 | |||
149 | /** |
||
150 | * Don't query the galaxy API when creating roles. |
||
151 | * |
||
152 | * @return AnsibleGalaxyInterface |
||
153 | */ |
||
154 | public function offline(): AnsibleGalaxyInterface |
||
160 | |||
161 | /** |
||
162 | * The API server destination. |
||
163 | * |
||
164 | * @param string $apiServer |
||
165 | * @return AnsibleGalaxyInterface |
||
166 | */ |
||
167 | public function server(string $apiServer): AnsibleGalaxyInterface |
||
173 | |||
174 | /** |
||
175 | * Force overwriting an existing role. |
||
176 | * |
||
177 | * @return AnsibleGalaxyInterface |
||
178 | */ |
||
179 | public function force(): AnsibleGalaxyInterface |
||
185 | |||
186 | /** |
||
187 | * A file containing a list of roles to be imported. |
||
188 | * |
||
189 | * @param string $roleFile FILE |
||
190 | * @return AnsibleGalaxyInterface |
||
191 | */ |
||
192 | public function roleFile(string $roleFile): AnsibleGalaxyInterface |
||
198 | |||
199 | /** |
||
200 | * The path to the directory containing your roles. |
||
201 | * |
||
202 | * The default is the roles_path configured in your |
||
203 | * ansible.cfg file (/etc/ansible/roles if not configured). |
||
204 | * |
||
205 | * @param string $rolesPath |
||
206 | * @return AnsibleGalaxyInterface |
||
207 | */ |
||
208 | public function rolesPath(string $rolesPath): AnsibleGalaxyInterface |
||
214 | |||
215 | /** |
||
216 | * Ignore errors and continue with the next specified role. |
||
217 | * |
||
218 | * @return AnsibleGalaxyInterface |
||
219 | */ |
||
220 | public function ignoreErrors(): AnsibleGalaxyInterface |
||
226 | |||
227 | /** |
||
228 | * Don't download roles listed as dependencies. |
||
229 | * |
||
230 | * @return AnsibleGalaxyInterface |
||
231 | */ |
||
232 | public function noDeps(): AnsibleGalaxyInterface |
||
238 | |||
239 | /** |
||
240 | * Get parameter string which will be used to call ansible. |
||
241 | * |
||
242 | * @param bool $asArray |
||
243 | * @return string|array |
||
244 | */ |
||
245 | public function getCommandlineArguments(bool $asArray = true) |
||
249 | } |
||
250 |