pyinfra 3.1.1__py2.py3-none-any.whl → 3.3__py2.py3-none-any.whl
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/api/arguments.py +9 -2
- pyinfra/api/arguments_typed.py +4 -5
- pyinfra/api/command.py +22 -3
- pyinfra/api/config.py +5 -2
- pyinfra/api/deploy.py +4 -2
- pyinfra/api/facts.py +3 -0
- pyinfra/api/host.py +15 -7
- pyinfra/api/operation.py +2 -1
- pyinfra/api/state.py +1 -1
- pyinfra/connectors/base.py +34 -8
- pyinfra/connectors/chroot.py +7 -2
- pyinfra/connectors/docker.py +24 -8
- pyinfra/connectors/dockerssh.py +7 -2
- pyinfra/connectors/local.py +7 -2
- pyinfra/connectors/ssh.py +9 -2
- pyinfra/connectors/sshuserclient/client.py +42 -14
- pyinfra/connectors/sshuserclient/config.py +2 -0
- pyinfra/connectors/terraform.py +1 -1
- pyinfra/connectors/util.py +13 -9
- pyinfra/context.py +9 -2
- pyinfra/facts/apk.py +8 -1
- pyinfra/facts/apt.py +68 -0
- pyinfra/facts/brew.py +13 -0
- pyinfra/facts/bsdinit.py +3 -0
- pyinfra/facts/cargo.py +5 -0
- pyinfra/facts/choco.py +6 -0
- pyinfra/facts/crontab.py +195 -0
- pyinfra/facts/deb.py +10 -0
- pyinfra/facts/dnf.py +5 -0
- pyinfra/facts/docker.py +16 -0
- pyinfra/facts/efibootmgr.py +113 -0
- pyinfra/facts/files.py +112 -7
- pyinfra/facts/flatpak.py +7 -0
- pyinfra/facts/freebsd.py +75 -0
- pyinfra/facts/gem.py +5 -0
- pyinfra/facts/git.py +12 -2
- pyinfra/facts/gpg.py +7 -0
- pyinfra/facts/hardware.py +13 -0
- pyinfra/facts/iptables.py +9 -1
- pyinfra/facts/launchd.py +5 -0
- pyinfra/facts/lxd.py +5 -0
- pyinfra/facts/mysql.py +9 -2
- pyinfra/facts/npm.py +5 -0
- pyinfra/facts/openrc.py +8 -0
- pyinfra/facts/opkg.py +245 -0
- pyinfra/facts/pacman.py +9 -1
- pyinfra/facts/pip.py +5 -0
- pyinfra/facts/pipx.py +82 -0
- pyinfra/facts/pkg.py +4 -0
- pyinfra/facts/pkgin.py +5 -0
- pyinfra/facts/podman.py +54 -0
- pyinfra/facts/postgres.py +10 -2
- pyinfra/facts/rpm.py +11 -0
- pyinfra/facts/runit.py +7 -0
- pyinfra/facts/selinux.py +16 -0
- pyinfra/facts/server.py +87 -79
- pyinfra/facts/snap.py +7 -0
- pyinfra/facts/systemd.py +5 -0
- pyinfra/facts/sysvinit.py +4 -0
- pyinfra/facts/upstart.py +5 -0
- pyinfra/facts/util/__init__.py +4 -1
- pyinfra/facts/util/units.py +30 -0
- pyinfra/facts/vzctl.py +5 -0
- pyinfra/facts/xbps.py +6 -1
- pyinfra/facts/yum.py +5 -0
- pyinfra/facts/zfs.py +41 -21
- pyinfra/facts/zypper.py +5 -0
- pyinfra/local.py +3 -2
- pyinfra/operations/apt.py +36 -22
- pyinfra/operations/crontab.py +189 -0
- pyinfra/operations/docker.py +61 -56
- pyinfra/operations/files.py +65 -1
- pyinfra/operations/freebsd/__init__.py +12 -0
- pyinfra/operations/freebsd/freebsd_update.py +70 -0
- pyinfra/operations/freebsd/pkg.py +219 -0
- pyinfra/operations/freebsd/service.py +116 -0
- pyinfra/operations/freebsd/sysrc.py +92 -0
- pyinfra/operations/git.py +23 -7
- pyinfra/operations/opkg.py +88 -0
- pyinfra/operations/pip.py +3 -2
- pyinfra/operations/pipx.py +90 -0
- pyinfra/operations/postgres.py +114 -27
- pyinfra/operations/runit.py +2 -0
- pyinfra/operations/server.py +9 -181
- pyinfra/operations/util/docker.py +44 -22
- pyinfra/operations/zfs.py +3 -3
- {pyinfra-3.1.1.dist-info → pyinfra-3.3.dist-info}/LICENSE.md +1 -1
- {pyinfra-3.1.1.dist-info → pyinfra-3.3.dist-info}/METADATA +25 -25
- pyinfra-3.3.dist-info/RECORD +187 -0
- pyinfra_cli/exceptions.py +5 -0
- pyinfra_cli/inventory.py +26 -9
- pyinfra_cli/log.py +3 -0
- pyinfra_cli/main.py +9 -8
- pyinfra_cli/prints.py +19 -4
- pyinfra_cli/util.py +3 -0
- pyinfra_cli/virtualenv.py +1 -1
- tests/test_cli/test_cli_deploy.py +15 -13
- tests/test_cli/test_cli_inventory.py +53 -0
- tests/test_connectors/test_ssh.py +302 -182
- tests/test_connectors/test_sshuserclient.py +68 -1
- pyinfra-3.1.1.dist-info/RECORD +0 -172
- {pyinfra-3.1.1.dist-info → pyinfra-3.3.dist-info}/WHEEL +0 -0
- {pyinfra-3.1.1.dist-info → pyinfra-3.3.dist-info}/entry_points.txt +0 -0
- {pyinfra-3.1.1.dist-info → pyinfra-3.3.dist-info}/top_level.txt +0 -0
|
@@ -64,3 +64,56 @@ class TestCliInventory(PatchSSHTestCase):
|
|
|
64
64
|
assert "leftover_data" in inventory.group_data
|
|
65
65
|
assert inventory.group_data["leftover_data"].get("still_parsed") == "never_used"
|
|
66
66
|
assert inventory.group_data["leftover_data"].get("_global_arg") == "gets_parsed"
|
|
67
|
+
|
|
68
|
+
def test_ignores_variables_with_leading_underscore(self):
|
|
69
|
+
ctx_state.reset()
|
|
70
|
+
ctx_inventory.reset()
|
|
71
|
+
|
|
72
|
+
result = run_cli(
|
|
73
|
+
path.join("tests", "test_cli", "inventories", "invalid.py"),
|
|
74
|
+
"exec",
|
|
75
|
+
"--debug",
|
|
76
|
+
"--",
|
|
77
|
+
"echo hi",
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
assert result.exit_code == 0, result.stdout
|
|
81
|
+
assert (
|
|
82
|
+
'Ignoring variable "_hosts" in inventory file since it starts with a leading underscore'
|
|
83
|
+
in result.stdout
|
|
84
|
+
)
|
|
85
|
+
assert inventory.hosts == {}
|
|
86
|
+
|
|
87
|
+
def test_only_supports_list_and_tuples(self):
|
|
88
|
+
ctx_state.reset()
|
|
89
|
+
ctx_inventory.reset()
|
|
90
|
+
|
|
91
|
+
result = run_cli(
|
|
92
|
+
path.join("tests", "test_cli", "inventories", "invalid.py"),
|
|
93
|
+
"exec",
|
|
94
|
+
"--debug",
|
|
95
|
+
"--",
|
|
96
|
+
"echo hi",
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
assert result.exit_code == 0, result.stdout
|
|
100
|
+
assert 'Ignoring variable "dict_hosts" in inventory file' in result.stdout, result.stdout
|
|
101
|
+
assert (
|
|
102
|
+
'Ignoring variable "generator_hosts" in inventory file' in result.stdout
|
|
103
|
+
), result.stdout
|
|
104
|
+
assert inventory.hosts == {}
|
|
105
|
+
|
|
106
|
+
def test_host_groups_may_only_contain_strings_or_tuples(self):
|
|
107
|
+
ctx_state.reset()
|
|
108
|
+
ctx_inventory.reset()
|
|
109
|
+
|
|
110
|
+
result = run_cli(
|
|
111
|
+
path.join("tests", "test_cli", "inventories", "invalid.py"),
|
|
112
|
+
"exec",
|
|
113
|
+
"--",
|
|
114
|
+
"echo hi",
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
assert result.exit_code == 0, result.stdout
|
|
118
|
+
assert 'Ignoring host group "issue_662"' in result.stdout, result.stdout
|
|
119
|
+
assert inventory.hosts == {}
|