pyinfra-cli-api 0.0.1__tar.gz → 0.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyinfra_cli_api-0.0.1/src/pyinfra_cli_api.egg-info → pyinfra_cli_api-0.0.2}/PKG-INFO +6 -3
- {pyinfra_cli_api-0.0.1 → pyinfra_cli_api-0.0.2}/README.md +5 -2
- {pyinfra_cli_api-0.0.1 → pyinfra_cli_api-0.0.2}/pyproject.toml +1 -1
- {pyinfra_cli_api-0.0.1 → pyinfra_cli_api-0.0.2}/src/pyinfra_cli_api/__init__.py +19 -2
- {pyinfra_cli_api-0.0.1 → pyinfra_cli_api-0.0.2/src/pyinfra_cli_api.egg-info}/PKG-INFO +6 -3
- {pyinfra_cli_api-0.0.1 → pyinfra_cli_api-0.0.2}/LICENSE.md +0 -0
- {pyinfra_cli_api-0.0.1 → pyinfra_cli_api-0.0.2}/setup.cfg +0 -0
- {pyinfra_cli_api-0.0.1 → pyinfra_cli_api-0.0.2}/src/pyinfra_cli_api/api.py +0 -0
- {pyinfra_cli_api-0.0.1 → pyinfra_cli_api-0.0.2}/src/pyinfra_cli_api.egg-info/SOURCES.txt +0 -0
- {pyinfra_cli_api-0.0.1 → pyinfra_cli_api-0.0.2}/src/pyinfra_cli_api.egg-info/dependency_links.txt +0 -0
- {pyinfra_cli_api-0.0.1 → pyinfra_cli_api-0.0.2}/src/pyinfra_cli_api.egg-info/requires.txt +0 -0
- {pyinfra_cli_api-0.0.1 → pyinfra_cli_api-0.0.2}/src/pyinfra_cli_api.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyinfra-cli-api
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: pyinfra cli api helper
|
|
5
5
|
Author-email: Timshel <timshel@github.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -11,6 +11,9 @@ License-File: LICENSE.md
|
|
|
11
11
|
Requires-Dist: pyinfra==3.11.2
|
|
12
12
|
Dynamic: license-file
|
|
13
13
|
|
|
14
|
+
[](https://pypi.org/project/pdoc3)
|
|
15
|
+
[](https://timshel.github.io/pyinfra-cli-api)
|
|
16
|
+
|
|
14
17
|
A library helper to use [pyinfra-cli](https://docs.pyinfra.com/en/3.x/cli.html) but with additional features.
|
|
15
18
|
|
|
16
19
|
Coming from `Ansible` I missed :
|
|
@@ -41,7 +44,7 @@ state.add_op(
|
|
|
41
44
|
state.run()
|
|
42
45
|
```
|
|
43
46
|
|
|
44
|
-
Can
|
|
47
|
+
Can then be run with:
|
|
45
48
|
|
|
46
49
|
``` bash
|
|
47
50
|
> python deploy.py --help
|
|
@@ -55,7 +58,7 @@ options:
|
|
|
55
58
|
--limit [LIMIT ...] Further restrict the target hosts by name and group name.
|
|
56
59
|
--tags [TAGS ...] Restrict the operations.
|
|
57
60
|
--debug-inventory Display the inventory.
|
|
58
|
-
-y, --
|
|
61
|
+
-y, --yes Run without confirmation
|
|
59
62
|
```
|
|
60
63
|
|
|
61
64
|
## Restricting hosts at the `playbook`/`deploy` level.
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
[](https://pypi.org/project/pdoc3)
|
|
2
|
+
[](https://timshel.github.io/pyinfra-cli-api)
|
|
3
|
+
|
|
1
4
|
A library helper to use [pyinfra-cli](https://docs.pyinfra.com/en/3.x/cli.html) but with additional features.
|
|
2
5
|
|
|
3
6
|
Coming from `Ansible` I missed :
|
|
@@ -28,7 +31,7 @@ state.add_op(
|
|
|
28
31
|
state.run()
|
|
29
32
|
```
|
|
30
33
|
|
|
31
|
-
Can
|
|
34
|
+
Can then be run with:
|
|
32
35
|
|
|
33
36
|
``` bash
|
|
34
37
|
> python deploy.py --help
|
|
@@ -42,7 +45,7 @@ options:
|
|
|
42
45
|
--limit [LIMIT ...] Further restrict the target hosts by name and group name.
|
|
43
46
|
--tags [TAGS ...] Restrict the operations.
|
|
44
47
|
--debug-inventory Display the inventory.
|
|
45
|
-
-y, --
|
|
48
|
+
-y, --yes Run without confirmation
|
|
46
49
|
```
|
|
47
50
|
|
|
48
51
|
## Restricting hosts at the `playbook`/`deploy` level.
|
|
@@ -14,6 +14,23 @@ def cli(
|
|
|
14
14
|
:param inventory: The default inventory file name, can be override by the `ìnventory` argument.
|
|
15
15
|
:param limit: Restrict the inventory to only a subset of hosts, further limited with `--limit` argument.
|
|
16
16
|
:param connect: A subset of ``pyinfra.api.host.Host`` from which to retrieve facts but not included in default operations.
|
|
17
|
+
|
|
18
|
+
Deploy will then support the following cli arguments:
|
|
19
|
+
|
|
20
|
+
``` bash
|
|
21
|
+
> python deploy.py --help
|
|
22
|
+
usage: pyinfra_cli_api [-h] [--limit [LIMIT ...]] [--tags [TAGS ...]] [--debug-inventory] [-y] [inventory]
|
|
23
|
+
|
|
24
|
+
positional arguments:
|
|
25
|
+
inventory Inventory file, override the `inventory` parameter
|
|
26
|
+
|
|
27
|
+
options:
|
|
28
|
+
-h, --help show this help message and exit
|
|
29
|
+
--limit [LIMIT ...] Further restrict the target hosts by name and group name.
|
|
30
|
+
--tags [TAGS ...] Restrict the operations.
|
|
31
|
+
--debug-inventory Display the inventory.
|
|
32
|
+
-y, --yes Run without confirmation
|
|
33
|
+
```
|
|
17
34
|
"""
|
|
18
35
|
|
|
19
36
|
parser = argparse.ArgumentParser(prog="pyinfra-cli-api")
|
|
@@ -25,7 +42,7 @@ def cli(
|
|
|
25
42
|
parser.add_argument("--limit", nargs="*", type=str, default=[], help="Further restrict the target hosts by name and group name.")
|
|
26
43
|
parser.add_argument("--tags", nargs="*", type=str, default=[], help="Restrict the operations.")
|
|
27
44
|
parser.add_argument("--debug-inventory", action="store_true", help="Display the inventory.")
|
|
28
|
-
parser.add_argument("-y", "--
|
|
45
|
+
parser.add_argument("-y", "--yes", action="store_true", help="Run without confirmation")
|
|
29
46
|
args = parser.parse_args()
|
|
30
47
|
|
|
31
48
|
state = CliApi(
|
|
@@ -34,7 +51,7 @@ def cli(
|
|
|
34
51
|
sub_limit=args.limit,
|
|
35
52
|
connect=connect,
|
|
36
53
|
debug_inventory=args.debug_inventory,
|
|
37
|
-
run_without_confirmation=args.
|
|
54
|
+
run_without_confirmation=args.yes,
|
|
38
55
|
tags=args.tags,
|
|
39
56
|
)
|
|
40
57
|
state.connect()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyinfra-cli-api
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: pyinfra cli api helper
|
|
5
5
|
Author-email: Timshel <timshel@github.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -11,6 +11,9 @@ License-File: LICENSE.md
|
|
|
11
11
|
Requires-Dist: pyinfra==3.11.2
|
|
12
12
|
Dynamic: license-file
|
|
13
13
|
|
|
14
|
+
[](https://pypi.org/project/pdoc3)
|
|
15
|
+
[](https://timshel.github.io/pyinfra-cli-api)
|
|
16
|
+
|
|
14
17
|
A library helper to use [pyinfra-cli](https://docs.pyinfra.com/en/3.x/cli.html) but with additional features.
|
|
15
18
|
|
|
16
19
|
Coming from `Ansible` I missed :
|
|
@@ -41,7 +44,7 @@ state.add_op(
|
|
|
41
44
|
state.run()
|
|
42
45
|
```
|
|
43
46
|
|
|
44
|
-
Can
|
|
47
|
+
Can then be run with:
|
|
45
48
|
|
|
46
49
|
``` bash
|
|
47
50
|
> python deploy.py --help
|
|
@@ -55,7 +58,7 @@ options:
|
|
|
55
58
|
--limit [LIMIT ...] Further restrict the target hosts by name and group name.
|
|
56
59
|
--tags [TAGS ...] Restrict the operations.
|
|
57
60
|
--debug-inventory Display the inventory.
|
|
58
|
-
-y, --
|
|
61
|
+
-y, --yes Run without confirmation
|
|
59
62
|
```
|
|
60
63
|
|
|
61
64
|
## Restricting hosts at the `playbook`/`deploy` level.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyinfra_cli_api-0.0.1 → pyinfra_cli_api-0.0.2}/src/pyinfra_cli_api.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|