pyinfra 3.0.dev0__py2.py3-none-any.whl → 3.0.2__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/__init__.py +3 -0
- pyinfra/api/arguments.py +115 -97
- pyinfra/api/arguments_typed.py +80 -0
- pyinfra/api/command.py +5 -3
- pyinfra/api/config.py +139 -39
- pyinfra/api/connectors.py +5 -2
- pyinfra/api/deploy.py +19 -19
- pyinfra/api/exceptions.py +35 -4
- pyinfra/api/facts.py +62 -86
- pyinfra/api/host.py +102 -15
- pyinfra/api/inventory.py +4 -0
- pyinfra/api/operation.py +188 -120
- pyinfra/api/operations.py +66 -113
- pyinfra/api/state.py +53 -34
- pyinfra/api/util.py +64 -33
- pyinfra/connectors/base.py +65 -20
- pyinfra/connectors/chroot.py +15 -13
- pyinfra/connectors/docker.py +62 -72
- pyinfra/connectors/dockerssh.py +20 -19
- pyinfra/connectors/local.py +32 -22
- pyinfra/connectors/ssh.py +162 -86
- pyinfra/connectors/sshuserclient/client.py +1 -1
- pyinfra/connectors/terraform.py +57 -39
- pyinfra/connectors/util.py +26 -27
- pyinfra/connectors/vagrant.py +27 -26
- pyinfra/context.py +1 -0
- pyinfra/facts/apk.py +7 -2
- pyinfra/facts/apt.py +15 -7
- pyinfra/facts/brew.py +28 -13
- pyinfra/facts/bsdinit.py +9 -6
- pyinfra/facts/cargo.py +6 -3
- pyinfra/facts/choco.py +8 -4
- pyinfra/facts/deb.py +21 -9
- pyinfra/facts/dnf.py +11 -6
- pyinfra/facts/docker.py +30 -5
- pyinfra/facts/files.py +49 -33
- pyinfra/facts/gem.py +7 -2
- pyinfra/facts/git.py +14 -21
- pyinfra/facts/gpg.py +4 -1
- pyinfra/facts/hardware.py +186 -138
- pyinfra/facts/launchd.py +7 -2
- pyinfra/facts/lxd.py +8 -2
- pyinfra/facts/mysql.py +19 -12
- pyinfra/facts/npm.py +3 -1
- pyinfra/facts/openrc.py +8 -2
- pyinfra/facts/pacman.py +13 -5
- pyinfra/facts/pip.py +2 -0
- pyinfra/facts/pkg.py +5 -1
- pyinfra/facts/pkgin.py +7 -2
- pyinfra/facts/postgres.py +170 -0
- pyinfra/facts/postgresql.py +5 -162
- pyinfra/facts/rpm.py +21 -15
- pyinfra/facts/runit.py +70 -0
- pyinfra/facts/selinux.py +12 -4
- pyinfra/facts/server.py +240 -82
- pyinfra/facts/snap.py +8 -2
- pyinfra/facts/systemd.py +37 -13
- pyinfra/facts/sysvinit.py +7 -4
- pyinfra/facts/upstart.py +7 -2
- pyinfra/facts/util/packaging.py +3 -2
- pyinfra/facts/vzctl.py +8 -4
- pyinfra/facts/xbps.py +7 -2
- pyinfra/facts/yum.py +10 -5
- pyinfra/facts/zypper.py +9 -4
- pyinfra/operations/apk.py +5 -3
- pyinfra/operations/apt.py +28 -25
- pyinfra/operations/brew.py +60 -29
- pyinfra/operations/bsdinit.py +6 -4
- pyinfra/operations/cargo.py +3 -1
- pyinfra/operations/choco.py +3 -1
- pyinfra/operations/dnf.py +16 -20
- pyinfra/operations/docker.py +339 -0
- pyinfra/operations/files.py +187 -168
- pyinfra/operations/gem.py +3 -1
- pyinfra/operations/git.py +23 -25
- pyinfra/operations/iptables.py +33 -25
- pyinfra/operations/launchd.py +5 -6
- pyinfra/operations/lxd.py +7 -4
- pyinfra/operations/mysql.py +59 -55
- pyinfra/operations/npm.py +8 -1
- pyinfra/operations/openrc.py +5 -3
- pyinfra/operations/pacman.py +6 -7
- pyinfra/operations/pip.py +19 -12
- pyinfra/operations/pkg.py +3 -1
- pyinfra/operations/pkgin.py +5 -3
- pyinfra/operations/postgres.py +349 -0
- pyinfra/operations/postgresql.py +18 -335
- pyinfra/operations/puppet.py +3 -1
- pyinfra/operations/python.py +8 -19
- pyinfra/operations/runit.py +182 -0
- pyinfra/operations/selinux.py +47 -29
- pyinfra/operations/server.py +138 -67
- pyinfra/operations/snap.py +3 -1
- pyinfra/operations/ssh.py +18 -16
- pyinfra/operations/systemd.py +18 -12
- pyinfra/operations/sysvinit.py +7 -5
- pyinfra/operations/upstart.py +7 -5
- pyinfra/operations/util/__init__.py +12 -0
- pyinfra/operations/util/docker.py +177 -0
- pyinfra/operations/util/files.py +24 -16
- pyinfra/operations/util/packaging.py +54 -38
- pyinfra/operations/util/service.py +39 -47
- pyinfra/operations/vzctl.py +12 -10
- pyinfra/operations/xbps.py +5 -3
- pyinfra/operations/yum.py +15 -19
- pyinfra/operations/zypper.py +9 -10
- pyinfra/version.py +5 -2
- {pyinfra-3.0.dev0.dist-info → pyinfra-3.0.2.dist-info}/METADATA +51 -58
- pyinfra-3.0.2.dist-info/RECORD +168 -0
- {pyinfra-3.0.dev0.dist-info → pyinfra-3.0.2.dist-info}/WHEEL +1 -1
- {pyinfra-3.0.dev0.dist-info → pyinfra-3.0.2.dist-info}/entry_points.txt +0 -3
- pyinfra_cli/__main__.py +4 -3
- pyinfra_cli/commands.py +3 -2
- pyinfra_cli/exceptions.py +75 -43
- pyinfra_cli/inventory.py +52 -31
- pyinfra_cli/log.py +10 -2
- pyinfra_cli/main.py +88 -65
- pyinfra_cli/prints.py +37 -109
- pyinfra_cli/util.py +15 -10
- tests/test_api/test_api.py +2 -0
- tests/test_api/test_api_arguments.py +9 -9
- tests/test_api/test_api_deploys.py +15 -19
- tests/test_api/test_api_facts.py +4 -5
- tests/test_api/test_api_operations.py +18 -20
- tests/test_api/test_api_util.py +41 -2
- tests/test_cli/test_cli.py +14 -50
- tests/test_cli/test_cli_deploy.py +17 -14
- tests/test_cli/test_cli_exceptions.py +50 -19
- tests/test_cli/test_cli_inventory.py +66 -0
- tests/test_cli/util.py +1 -1
- tests/test_connectors/test_dockerssh.py +11 -8
- tests/test_connectors/test_ssh.py +88 -23
- tests/test_connectors/test_sshuserclient.py +1 -1
- tests/test_connectors/test_terraform.py +11 -8
- tests/test_connectors/test_vagrant.py +6 -6
- pyinfra/connectors/ansible.py +0 -175
- pyinfra/connectors/mech.py +0 -189
- pyinfra/connectors/pyinfrawinrmsession/__init__.py +0 -28
- pyinfra/connectors/winrm.py +0 -312
- pyinfra/facts/windows.py +0 -366
- pyinfra/facts/windows_files.py +0 -90
- pyinfra/operations/windows.py +0 -59
- pyinfra/operations/windows_files.py +0 -538
- pyinfra-3.0.dev0.dist-info/RECORD +0 -170
- tests/test_connectors/test_ansible.py +0 -64
- tests/test_connectors/test_mech.py +0 -126
- {pyinfra-3.0.dev0.dist-info → pyinfra-3.0.2.dist-info}/LICENSE.md +0 -0
- {pyinfra-3.0.dev0.dist-info → pyinfra-3.0.2.dist-info}/top_level.txt +0 -0
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
pyinfra/__init__.py,sha256=7ZcKHGWk7_nYxsYrbFBB_vJr-J-Ddbc56ZS4sk5ArVw,535
|
|
2
|
-
pyinfra/__main__.py,sha256=aVd00glLz5CMJGXgt1XxbOvC2HluqaowoTOjxgIpBaA,47
|
|
3
|
-
pyinfra/context.py,sha256=4oPK1wsLL4aG5CJtt7Ufe_4D3knrBeZaeZWlU979JNg,3394
|
|
4
|
-
pyinfra/local.py,sha256=0bpIRCyDKM6i_jA1i8Ej2qr_iWIF9cUYWutXNdLj8po,2751
|
|
5
|
-
pyinfra/progress.py,sha256=X3hXZ4Flh_L9FE4ZEWxWoG0R4dA5UPd1FCO-Exd5Xtc,4193
|
|
6
|
-
pyinfra/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
pyinfra/version.py,sha256=hAgEPHVJVjA2I-rI0gy038UAPVKcmulk-3dZLOmkYrI,153
|
|
8
|
-
pyinfra/api/__init__.py,sha256=_gId0L-DYg7A1aofFN5ra--GBE2sq7hpobjL470OhTc,888
|
|
9
|
-
pyinfra/api/arguments.py,sha256=CDnEGHPs2V4MfUWmVtfFzTlflpn4pbgYkON6Zh6Alfs,9976
|
|
10
|
-
pyinfra/api/command.py,sha256=KGhAnaxZGZv5NJa0-aOgu2g9nOYTsdjlCaFHR6QO53E,7176
|
|
11
|
-
pyinfra/api/config.py,sha256=72lJULMuVyYBpAPdSkosOYQ6pwtxLbifly4GdsXj2js,3892
|
|
12
|
-
pyinfra/api/connect.py,sha256=Z9wusMLR_jBkKKk5D4AUOj8LHl3H5MsNO5FxAeR4jac,1416
|
|
13
|
-
pyinfra/api/connectors.py,sha256=SLmKtoN4cXvcQz9IgWSPI-d3ZMzJ09pcvka42Fiuo7s,544
|
|
14
|
-
pyinfra/api/deploy.py,sha256=X6EY0p01K-wLbaxYZ_9B15IgPEksflHFFHmX7nCFRRs,2657
|
|
15
|
-
pyinfra/api/exceptions.py,sha256=gWLNIY7yrNwTuQBBJ1xNUqD6OcUCi-dZYJc4G5eU-nA,1185
|
|
16
|
-
pyinfra/api/facts.py,sha256=g0JS7PvRL2Sycr7BjAYEDkNAvRfJqEkUEZ4kZ9rzmKc,9961
|
|
17
|
-
pyinfra/api/host.py,sha256=zwKFbT_J2ZU3kt5phM6KY6bYc3A1E8fKqC9NpUdt79o,10852
|
|
18
|
-
pyinfra/api/inventory.py,sha256=83ttxbGbIwN2tvmVTW68fumIDXNMk48qvL0NxwGPkNs,7663
|
|
19
|
-
pyinfra/api/operation.py,sha256=XyysCye7quw7NhqEOHPLGN-1fvRyn7nT7lusLc1M0VQ,12070
|
|
20
|
-
pyinfra/api/operations.py,sha256=gIQR_q9L3ZdDEhspX7vkvjlmyf4j_EljzVyw5iXMnV4,12668
|
|
21
|
-
pyinfra/api/state.py,sha256=Yirv6GgHAMSzWwCYyPm_wyqgyomdP_TRt1ITN3-OaZs,12110
|
|
22
|
-
pyinfra/api/util.py,sha256=4bHJna9BF2b2LYNAhw1fNpUte1ZLNeZrzDu9aeOPtYc,11228
|
|
23
|
-
pyinfra/connectors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
|
-
pyinfra/connectors/ansible.py,sha256=Z0MucRh8n98Z5Kd-uoawrkueNqjQGmElPlafQNjcRgE,5773
|
|
25
|
-
pyinfra/connectors/base.py,sha256=gwmUpGCZN3JfZZqWh8WrwVPHzAKcexT9qHduNRY5eTg,2597
|
|
26
|
-
pyinfra/connectors/chroot.py,sha256=HCDktwITLeG7UgAKxc6-piNGGCnE-dctH5wCJCpppn4,5864
|
|
27
|
-
pyinfra/connectors/docker.py,sha256=RtZTnP8RS4X6zcFlRlchiErybVbPKDx3HLQcsxcU-58,9417
|
|
28
|
-
pyinfra/connectors/dockerssh.py,sha256=6bnwnSwxKhbIfI2G3JnaeUS4Cwnx7j7AzSLpHd8MjIo,8909
|
|
29
|
-
pyinfra/connectors/local.py,sha256=4humB4h8px8uLCgKskdo4vheJYocbQg10I4gKcS2TCQ,6776
|
|
30
|
-
pyinfra/connectors/mech.py,sha256=0zBhKndG5_BUC760b-m3IG_klcIuuHr9h2M5VW_udaQ,4677
|
|
31
|
-
pyinfra/connectors/ssh.py,sha256=2TNdiaKCCNbcicqr2An8WBg7UfDUgY79JMN-9QluiXI,19342
|
|
32
|
-
pyinfra/connectors/ssh_util.py,sha256=CN_5AdTA3RpiWCnXTrRBjez1NsN59hITDzQmXIkZvoE,3683
|
|
33
|
-
pyinfra/connectors/terraform.py,sha256=4xwfuKskFEnMVCBOTbbJ360UmLuZ9CjN5nrHcrnB1GA,3243
|
|
34
|
-
pyinfra/connectors/util.py,sha256=57PmqfV5Uh2ejkd54yHnYruqB9fD0BaTqXDd_xf4VgI,11203
|
|
35
|
-
pyinfra/connectors/vagrant.py,sha256=fO7Z6g3H1_5TZ68Uz1DiBfWvzGMdvIBmJfbmMGkJ0w0,4653
|
|
36
|
-
pyinfra/connectors/winrm.py,sha256=Xdf2xRCy-7SrKkfSNvnhpZy3W3nTDNCEgI9Rbc4IiRs,10733
|
|
37
|
-
pyinfra/connectors/pyinfrawinrmsession/__init__.py,sha256=FbP7zT8Qs9k0pImTGMNzbwuokHbJKfMRHl4Qumav4yc,1113
|
|
38
|
-
pyinfra/connectors/sshuserclient/__init__.py,sha256=Qc4RO2wknSWIiNTwOeQ0y2TeiuKHmyWDW2Dz4MOo9CE,44
|
|
39
|
-
pyinfra/connectors/sshuserclient/client.py,sha256=7YSd3QckZuPDRnKzy2FfG3J8zp7CY-jny8tbWwxvKro,9720
|
|
40
|
-
pyinfra/connectors/sshuserclient/config.py,sha256=UMwkvTgAIS7__re6Wz_pwH6EU4kO1-uMQ5zuFakH0v4,2721
|
|
41
|
-
pyinfra/facts/__init__.py,sha256=myTXSOZmAqmU88Fyifn035h9Lr6Gj2mlka_jDcXyKGw,347
|
|
42
|
-
pyinfra/facts/apk.py,sha256=2-Hz4I_7iLU06Y0T9_JX5Fo3k_FZpgKNGZ_I5KQGTto,482
|
|
43
|
-
pyinfra/facts/apt.py,sha256=zqFSPIAaIgHWWg3eGgL-BDX1aqvgiQ7rNc8QrE1LXLg,1999
|
|
44
|
-
pyinfra/facts/brew.py,sha256=POnOx3PWzK1B8pbtkI9wBmYSUsG0IblpwrMHZsMC7Og,2266
|
|
45
|
-
pyinfra/facts/bsdinit.py,sha256=sx54RAmS7rjTDzLbUWv86UFtfE8H56qokektf5smN30,490
|
|
46
|
-
pyinfra/facts/cargo.py,sha256=C_2NIWcDzT5Y6xxnT5TvuhWpLJCQTqVVXK8biiUvhjI,531
|
|
47
|
-
pyinfra/facts/choco.py,sha256=CatATw35ToFTgFNO_aXwl7ZSi2Mply47VixOJzK7Dp8,716
|
|
48
|
-
pyinfra/facts/deb.py,sha256=aTlXoBsuORIe5cbFV_UbXZZLOskcfrWoyuDg_cSAEFY,1662
|
|
49
|
-
pyinfra/facts/dnf.py,sha256=zV_Fx4cq81lyKctDYki65e088kXDAyZiwkEcBDOoLtU,862
|
|
50
|
-
pyinfra/facts/docker.py,sha256=0EUskxna88haXeHYJBFUDnUHJcX2QIwwKME_dRcfoiY,1678
|
|
51
|
-
pyinfra/facts/files.py,sha256=rRinlnVO_qwdw1rR61TQRVUdqv-UcE4KC0WhdWHoWu0,11088
|
|
52
|
-
pyinfra/facts/gem.py,sha256=bUl8PcXHb5wIw3O4E9YAc0cPzCZQK1IbV_4f3hZht6s,473
|
|
53
|
-
pyinfra/facts/git.py,sha256=rk4NS2SQJiosI6eY2eCy_p9kOP4O8UARRjFi16ObE2w,1294
|
|
54
|
-
pyinfra/facts/gpg.py,sha256=OCfXW-JQpjyn7jLrluEXjpu9Wr_DE_6eWEsyKVLOnNU,3729
|
|
55
|
-
pyinfra/facts/hardware.py,sha256=0akjT5LfEg3aHgOEvdIS0fRbUjoDJfl0ckQXWW8of_Q,9217
|
|
56
|
-
pyinfra/facts/iptables.py,sha256=sUkywfHZUXnMZF_KshAnyJufrJvZ9fBYnERSRbwOCRE,3374
|
|
57
|
-
pyinfra/facts/launchd.py,sha256=NtsaAJh0rncopvuawqqv36kOdFsUdpiYS7e5yCGoXeA,668
|
|
58
|
-
pyinfra/facts/lxd.py,sha256=uYmqu8vSzfhM0Ymm15pT4IhI4UbRayC23GM6kSYN1mw,337
|
|
59
|
-
pyinfra/facts/mysql.py,sha256=o5qvcxKjW2zXNSr4tLZa1IaNEUz0TVLWy7T9uLlxTm8,5896
|
|
60
|
-
pyinfra/facts/npm.py,sha256=c_bU5BoeOfBfZd_qyz2K1ZzzlH_k1VSzjuOiGqC4H8o,674
|
|
61
|
-
pyinfra/facts/openrc.py,sha256=IluFop9jskxHnWRJkKlGZZV7nQDOFzhiAMAH0ThyiLo,1350
|
|
62
|
-
pyinfra/facts/pacman.py,sha256=SJTdi49nBHk7Gb6ajf2I5PZTHWkqZ_k4npAf695luRs,1001
|
|
63
|
-
pyinfra/facts/pip.py,sha256=v6pJCQHOB8DaDgpyrLTz3kKKCSqvLG_zs0uy6_gGOf8,702
|
|
64
|
-
pyinfra/facts/pkg.py,sha256=GgRU5x9OWfAfqF-KgJiJz0ndtLKhiRGhtTG4agfunuM,452
|
|
65
|
-
pyinfra/facts/pkgin.py,sha256=_rekZJtKLx2TOHd_REJLMDp02typZMpQkZ7sC4FLJSQ,481
|
|
66
|
-
pyinfra/facts/postgresql.py,sha256=1xob1BqC6jt4PlUW1jXJkCzTfYvKHiw6cKem0ycerq8,4104
|
|
67
|
-
pyinfra/facts/rpm.py,sha256=CdC-r2_cfbt81z3sjAE4I-ne46jI-Of6uyDSvELVJfk,1973
|
|
68
|
-
pyinfra/facts/selinux.py,sha256=N0zbJrAtBeRBtxZFUHbYTLQ2L4mRV7_Oj3Cj3OA1Npw,4272
|
|
69
|
-
pyinfra/facts/server.py,sha256=Hkry257da5LVNS2E9IjSKHvthaV3u8olmGy8-6kIdkU,16093
|
|
70
|
-
pyinfra/facts/snap.py,sha256=9PYA73ASi-FgBk_y42lGJyETqEgfcJGm-6EFeKzayhE,1910
|
|
71
|
-
pyinfra/facts/systemd.py,sha256=AiN9R3BIIp8QJeWFjc18VQQ5DV3uptAX-G_HiF4YWP0,3290
|
|
72
|
-
pyinfra/facts/sysvinit.py,sha256=EBmQ86TwomwJrAgSpiUM5ddoalKK6jpAaJDwEixvczw,1398
|
|
73
|
-
pyinfra/facts/upstart.py,sha256=9mqTYsUpDs7gC5Rest2sQS3EohGXAPjEQUINJWELkW0,543
|
|
74
|
-
pyinfra/facts/vzctl.py,sha256=AnRl6SZ7HxMGOVl021v0P37pN4tujbwLFuvxUMOCW_M,591
|
|
75
|
-
pyinfra/facts/windows.py,sha256=1ioEHI5GuNqfIAJWlOI2iUxdn7JPANk83uvfyb5PcYs,8664
|
|
76
|
-
pyinfra/facts/windows_files.py,sha256=Yi0l8jezgvRJp5JuncDjyBTFbhuMB8hlsrYvBFT15EU,2101
|
|
77
|
-
pyinfra/facts/xbps.py,sha256=HBvQ7hvvzC8-Bi952s56Sn4edlOKVITuATpE2sqEPqY,481
|
|
78
|
-
pyinfra/facts/yum.py,sha256=h255QEH8VcQTCVdkjwikyk-Pxqzh-dl3Og6a0nMmyVE,827
|
|
79
|
-
pyinfra/facts/zypper.py,sha256=O3qoRRh6F6NUP1kEJQ3hE_VJ6C5E8wHPIqZnBthsQcM,766
|
|
80
|
-
pyinfra/facts/util/__init__.py,sha256=f7HKu8z9_yFC899ajJ3RFiyivioaZeGfOI6nf9GviCs,521
|
|
81
|
-
pyinfra/facts/util/databases.py,sha256=EphGQApzRBXI2nG1FL9h8bozY-o4SgdQgpv9YcnCkxs,730
|
|
82
|
-
pyinfra/facts/util/packaging.py,sha256=KF1geTb-C9zs_O1oUfAKpdJCktQJCbvChjeLg6yXzFc,1090
|
|
83
|
-
pyinfra/facts/util/win_files.py,sha256=S_IQ5kJD6ZgkEcVHajgh7BIMolLV-1q1ghIcwAS-E1Q,2561
|
|
84
|
-
pyinfra/operations/__init__.py,sha256=SOcW337KXIzD_LH-iJJfq14BQcCs5JzwswJ0PIzDgF4,357
|
|
85
|
-
pyinfra/operations/apk.py,sha256=UmlrrMheS1FcReI4foZt6bqukAiKDVVSb1HEg3VXbjw,2035
|
|
86
|
-
pyinfra/operations/apt.py,sha256=MgZY6Uy26smPjbSF9QHfzFYD8aNHodvtZn7FpTV9tUA,13499
|
|
87
|
-
pyinfra/operations/brew.py,sha256=vkvz80bAG38WusloZ17Djkes4GM2vUnCSj9qLpyoJn4,4262
|
|
88
|
-
pyinfra/operations/bsdinit.py,sha256=qzLBcYjp1Dr0Wb0lD9DGPs7SLveVvLDBupnNV8PtmKE,1571
|
|
89
|
-
pyinfra/operations/cargo.py,sha256=wcEhQEz02e6_WGL6ve_bW1IOrnHQqOGzhyMiMjmm0co,1042
|
|
90
|
-
pyinfra/operations/choco.py,sha256=Qr2lg471XiIhMJ4QvUbmRMNCP-3BNE4VbxNaJE-JjzU,1453
|
|
91
|
-
pyinfra/operations/dnf.py,sha256=FFMuIF2xv0UCwDfp4Q8rBsCTujiVGVId-0OLBewA9GQ,5543
|
|
92
|
-
pyinfra/operations/files.py,sha256=d7o_-B1bdqceGyBUidiAc-DgtJscUWOmL8HEixdAQ28,52146
|
|
93
|
-
pyinfra/operations/gem.py,sha256=vEGYFniRGrxll8ARNauZQdSPjSHP8-me4UEH1srK-q0,1070
|
|
94
|
-
pyinfra/operations/git.py,sha256=xsz-h8al5mG0PIiMQaQRtxu8egdHzuf1eTnpe70qZ2w,11612
|
|
95
|
-
pyinfra/operations/iptables.py,sha256=KMMWct43Ovx-L2tRY4E1GAyTalk96WOJ4iEJMAjxySU,8856
|
|
96
|
-
pyinfra/operations/launchd.py,sha256=i5oeCEekOEQTVlNlayQO057DRXT103H3tWRwp8IRVko,1164
|
|
97
|
-
pyinfra/operations/lxd.py,sha256=pcdvmxfG6Bm8m_cuF1wRpmpaUzTq2nTd6iOf4jDRicA,1639
|
|
98
|
-
pyinfra/operations/mysql.py,sha256=79iJtUj9Q0N3pjceH0x3LxweXgapOcGHYH8beIlsuRw,19127
|
|
99
|
-
pyinfra/operations/npm.py,sha256=PyQJ2DQ_u0jclHNLL21ltUV64VPhC9rriGv5HOc75zY,1404
|
|
100
|
-
pyinfra/operations/openrc.py,sha256=eta2j16uC24ZHFBB1CVgV1BdzuvY7S5JjcyGA_iVyYw,1510
|
|
101
|
-
pyinfra/operations/pacman.py,sha256=8VyU0vIYGWVlxE2EKKrV7JFWoBHIlayYfjVw2x8TEf0,1658
|
|
102
|
-
pyinfra/operations/pip.py,sha256=Z4PNJXH81qA27xxBDmKscHVw1CJsmFtOFkg9qBVHfG8,5362
|
|
103
|
-
pyinfra/operations/pkg.py,sha256=sLa3-_YoRMkGNdCovduaZwtAcuADDdaeiKWnIHDiq_k,2222
|
|
104
|
-
pyinfra/operations/pkgin.py,sha256=lBTBtEaaySCojCeHKfq2IFErLwGcNoBelYkgezR_Q7g,1916
|
|
105
|
-
pyinfra/operations/postgresql.py,sha256=0F7oyf0GXIa4Ex2B187sGdAh2gODZ6mnqCFn-oSDgJU,9162
|
|
106
|
-
pyinfra/operations/puppet.py,sha256=EOT4RnYro9K6N_HrPvYHd3bZX8rcAQxPNfLcuzm-LqE,797
|
|
107
|
-
pyinfra/operations/python.py,sha256=Z1KrJJ-SGAk7lPNiIPh8B4U7z5hPAiUnyNoaGzQRNdY,2398
|
|
108
|
-
pyinfra/operations/selinux.py,sha256=_9_LIa9rFdQ1-qPuJu7eJ3eGRvm3hq3wyYQUAsnzjgM,5537
|
|
109
|
-
pyinfra/operations/server.py,sha256=EELOsHdggGIBHW5J9bP8LmjmbXUkb041TjNIWvw2Y4c,33953
|
|
110
|
-
pyinfra/operations/snap.py,sha256=_K-0UdketVIJMe3VlvfvnKGd6NM_3PC-ZzZeeMiGHME,2987
|
|
111
|
-
pyinfra/operations/ssh.py,sha256=98g3LJpj9M_pkVy0tu9J7lcTJd6xwnfNYYKz9dVlXgY,5473
|
|
112
|
-
pyinfra/operations/systemd.py,sha256=JcbvpHYgj-pxYtVk9DVGkObjpo2UPq52ms6CnB68MIY,3712
|
|
113
|
-
pyinfra/operations/sysvinit.py,sha256=s8mrS5j_RFrKvyBhhnQk1MGhFYyPNvrOMivQy_jV26Y,3996
|
|
114
|
-
pyinfra/operations/upstart.py,sha256=G4x7eOmY8ijEzIXxvJfMSMVPKUHqBwZ_aUoR6DGzWrI,1894
|
|
115
|
-
pyinfra/operations/vzctl.py,sha256=qkWm9oXxDijrVvKpHb1KMTLfz90kOVThwSKGUlfuTqM,2996
|
|
116
|
-
pyinfra/operations/windows.py,sha256=_fGBTC44xpa8e2do71kp-ANd4p4gsP2S4tFr7nD_uSk,1660
|
|
117
|
-
pyinfra/operations/windows_files.py,sha256=v1c6ZxzjWBCtbw_Q41xiIxnfTbn_Eb3T0p-yR1gcWQ8,15756
|
|
118
|
-
pyinfra/operations/xbps.py,sha256=BBI0sCpXE5vCXZ8QQhZND5Lkpd04GtL0_913Pf0mqOw,1432
|
|
119
|
-
pyinfra/operations/yum.py,sha256=1kttuMI83dSMTy0cWOezWalRgDoQ0X81kcwngx8F8IY,5536
|
|
120
|
-
pyinfra/operations/zypper.py,sha256=rXKfFM6CcqEhwS-chQVCPOU_IM6iGNu4t1g9CTbaw1Y,5487
|
|
121
|
-
pyinfra/operations/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
122
|
-
pyinfra/operations/util/files.py,sha256=UwuaGH8_g_glC4QW3LKH7MrzoBpQJ8mk11_g_rk9a8c,3339
|
|
123
|
-
pyinfra/operations/util/packaging.py,sha256=0yuDEcrToBDdguhSD89OoB6-oiXTmgvfIibuCTBw9iQ,8273
|
|
124
|
-
pyinfra/operations/util/service.py,sha256=LCyjlCujlXxVzBwfoAOUdibOnFQ-cyC2dJwWbBn0HD8,1879
|
|
125
|
-
pyinfra_cli/__init__.py,sha256=G0X7tNdqT45uWuK3aHIKxMdDeCgJ7zHo6vbxoG6zy_8,284
|
|
126
|
-
pyinfra_cli/__main__.py,sha256=SqTfTdXr0giSsG5uwTDdP6IXkdW7CO9iMGCqpZefKTA,859
|
|
127
|
-
pyinfra_cli/commands.py,sha256=eQr3HCuashedJDSxRGdY463FCYHpOmect6I0P_3Z0_U,1761
|
|
128
|
-
pyinfra_cli/exceptions.py,sha256=lOVgjEs4ggqgP-hr27P0A_3TxgC1iVZXh15ZgJVJBHQ,3783
|
|
129
|
-
pyinfra_cli/inventory.py,sha256=mQoYoUDFVTOltlPWhwb3mM4DALg-zOLUKPto7VwSsNk,9516
|
|
130
|
-
pyinfra_cli/log.py,sha256=vKLCMtiPpQEoLU9N3ypbKWb37qCVS-d_HyCcDa_sG-U,1906
|
|
131
|
-
pyinfra_cli/main.py,sha256=LAO5yheQgV396Qj4Dm9GsfxcVUQwcZ8UqESMqEedScY,19005
|
|
132
|
-
pyinfra_cli/prints.py,sha256=3FrMPOioJQnrTERve2_GGLEIju10BGkAbpXOkknlkm0,11382
|
|
133
|
-
pyinfra_cli/util.py,sha256=z3hsNSC9w6ln2-VDQVzk76z4P-gVzjLMEH2TUP4sfno,6218
|
|
134
|
-
pyinfra_cli/virtualenv.py,sha256=6j9W54JkQLN02SrZZIVwszp0GxlaaDEUWFZjBDHIWNA,2466
|
|
135
|
-
tests/test_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
136
|
-
tests/test_api/test_api.py,sha256=BjVq93nPIomt_zQW4QZF2gf0VfLpdAnjz0DTzQvOX_g,2295
|
|
137
|
-
tests/test_api/test_api_arguments.py,sha256=JerG2L7yHX7UOl6YzPsKf9RYuERiKkfD17ac0LrRHLw,2056
|
|
138
|
-
tests/test_api/test_api_command.py,sha256=OW0ESMyS5vo38u17DHeCrSIaIkW9gMU5PSkXL7mRrq0,3204
|
|
139
|
-
tests/test_api/test_api_config.py,sha256=bf0mDrUie3On6zGC_hJBpv-wvSf3LHBIBzUDvkopEt0,708
|
|
140
|
-
tests/test_api/test_api_deploys.py,sha256=AzP1_nBnoDnDmZpbXN8quBWt9owLwTF9Wru1zc2Vwtg,4300
|
|
141
|
-
tests/test_api/test_api_facts.py,sha256=zvp3InCv912EMJR7v6WmN7gKLF9yBJCCKwetjgy-gAA,10737
|
|
142
|
-
tests/test_api/test_api_host.py,sha256=U_VW2vTl35vR8EdyIGMKr4y0ydsDLbvHSjZDa99CyNE,1119
|
|
143
|
-
tests/test_api/test_api_inventory.py,sha256=VLbV0MXdRLOPvTXJF156ne6rAx1cBlFfgq_1S79s4tw,2013
|
|
144
|
-
tests/test_api/test_api_operations.py,sha256=j0k3NLmgugsaC6mJ0W52DvbTSIsNKtL5NRcxBa69tMk,20098
|
|
145
|
-
tests/test_api/test_api_util.py,sha256=YXhhzeH5GA8bxtwEi_YrV6wUHFWnXg-9SCcyQW1bL-8,684
|
|
146
|
-
tests/test_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
147
|
-
tests/test_cli/test_cli.py,sha256=B8Ceqc4FdJW9DEE6kKWv2gzfIy0cPnEub2TKSHgxzZY,7047
|
|
148
|
-
tests/test_cli/test_cli_deploy.py,sha256=WQ8p5t5EQW5Ff6cmVw-676b7kVrrdWJ_VaJrk7bsRMw,4928
|
|
149
|
-
tests/test_cli/test_cli_exceptions.py,sha256=jJnmpIC9Q3iLzpwU24x2M01wsOkpPj0iVAW5FFbXCy0,1565
|
|
150
|
-
tests/test_cli/test_cli_util.py,sha256=-Ehnj0cO-EkF-6KLxcPPcFeuAUMTz-fKITrxhuiYhV4,2562
|
|
151
|
-
tests/test_cli/test_context_objects.py,sha256=JiUTwQP7yvcqA47Kq9jtdsB_Z8nxGMZN46d9pR--FYA,2130
|
|
152
|
-
tests/test_cli/util.py,sha256=ePf-jzUoRP7STVYR_fjSgDEjLuyDIn0kZqCt9FHmMvs,315
|
|
153
|
-
tests/test_connectors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
154
|
-
tests/test_connectors/test_ansible.py,sha256=PsnFx7WY1N8z8cocEmqy1G12OVUmh58-fibLojBvs0k,2123
|
|
155
|
-
tests/test_connectors/test_chroot.py,sha256=QK7YgFPXzHh8y363-tmHvzZ0Ok5PVJWFTDAvwt91eac,5907
|
|
156
|
-
tests/test_connectors/test_docker.py,sha256=0EjkfhCHpLCfL4X-AIdMNw5ASaseY0tbRAn7T_TAkMQ,6566
|
|
157
|
-
tests/test_connectors/test_dockerssh.py,sha256=N5ZZnEoedbUxw9YWQgzd2DEjLLxP6054wDM0EY6lEbc,9263
|
|
158
|
-
tests/test_connectors/test_local.py,sha256=N_FkejDZKu7XLnKeApqfBARYMyxf-hRXCQJrXLHvwRg,7442
|
|
159
|
-
tests/test_connectors/test_mech.py,sha256=b1_s1f5Xfojaeajh1Wq_AuegnPA6fq35FKDck4_osDI,4383
|
|
160
|
-
tests/test_connectors/test_ssh.py,sha256=FqBjmT_s5Fvt6U_k1bHS8SC9MRXlhalTlvdrUvhZbEM,37740
|
|
161
|
-
tests/test_connectors/test_sshuserclient.py,sha256=vNCST32nwU-27Y-bfpBBxpL1J-6TY9xXL9rqfrNzndA,5681
|
|
162
|
-
tests/test_connectors/test_terraform.py,sha256=9KPHgBxfy0eni1lGFL6x4ZehG0vJAKjS1E1MO0-6vCw,3807
|
|
163
|
-
tests/test_connectors/test_util.py,sha256=hQir0WyjH0LEF6xvIyHNyqdI5pkJX6qUR9287MgO2bY,4647
|
|
164
|
-
tests/test_connectors/test_vagrant.py,sha256=A7eHwi2JKjwoKuFQPJZJiCUJ7bdJn9JY2P81Ln3NoIo,3630
|
|
165
|
-
pyinfra-3.0.dev0.dist-info/LICENSE.md,sha256=gwC95tUll0gwB32tHNkTAasN7Sb6vjWzXa305NwClbI,1076
|
|
166
|
-
pyinfra-3.0.dev0.dist-info/METADATA,sha256=deVcEsAO5fJ1L6HLu-gIzDRDMDLnpLn_kgpEPjO1khM,8419
|
|
167
|
-
pyinfra-3.0.dev0.dist-info/WHEEL,sha256=bb2Ot9scclHKMOLDEHY6B2sicWOgugjFKaJsT7vwMQo,110
|
|
168
|
-
pyinfra-3.0.dev0.dist-info/entry_points.txt,sha256=kxZrcS-gRhlTumnXo1C_yD3oFy3DgE56GSdb5ssO3lo,636
|
|
169
|
-
pyinfra-3.0.dev0.dist-info/top_level.txt,sha256=2K6D1mK35JTSEBgOfEPV-N-uA2SDErxGiE0J-HUMMVI,26
|
|
170
|
-
pyinfra-3.0.dev0.dist-info/RECORD,,
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
from os import path
|
|
2
|
-
from unittest import TestCase
|
|
3
|
-
|
|
4
|
-
from pyinfra.api.exceptions import InventoryError
|
|
5
|
-
from pyinfra.connectors.ansible import AnsibleInventoryConnector
|
|
6
|
-
|
|
7
|
-
TEST_DATA = [
|
|
8
|
-
("mail.example.com", {}, ["all"]),
|
|
9
|
-
("foo.example.com", {}, ["all", "webservers"]),
|
|
10
|
-
("bar.example.com", {}, ["all", "webservers"]),
|
|
11
|
-
("one.example.com", {}, ["all", "dbservers"]),
|
|
12
|
-
("two.example.com", {}, ["all", "dbservers"]),
|
|
13
|
-
("three.example.com", {}, ["all", "dbservers"]),
|
|
14
|
-
]
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class TestAnsibleConnector(TestCase):
|
|
18
|
-
def test_make_names_data_no_file(self):
|
|
19
|
-
with self.assertRaises(InventoryError):
|
|
20
|
-
AnsibleInventoryConnector.make_names_data(inventory_filename="/not/a/file")
|
|
21
|
-
|
|
22
|
-
def test_make_names_data_ini(self):
|
|
23
|
-
data = AnsibleInventoryConnector.make_names_data(
|
|
24
|
-
inventory_filename=path.join(
|
|
25
|
-
"tests",
|
|
26
|
-
"deploy",
|
|
27
|
-
"inventories",
|
|
28
|
-
"inventory_ansible",
|
|
29
|
-
),
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
test_data = [
|
|
33
|
-
("webserver-1.net", {}, ["web_and_db_servers", "webservers"]),
|
|
34
|
-
("webserver-2.net", {}, ["web_and_db_servers", "webservers"]),
|
|
35
|
-
("webserver-3.net", {}, ["web_and_db_servers", "webservers"]),
|
|
36
|
-
("dbserver-01.net", {}, ["dbservers", "web_and_db_servers"]),
|
|
37
|
-
("dbserver-02.net", {}, ["dbservers", "web_and_db_servers"]),
|
|
38
|
-
]
|
|
39
|
-
|
|
40
|
-
assert sorted(data) == sorted(test_data)
|
|
41
|
-
|
|
42
|
-
def test_make_names_data_json(self):
|
|
43
|
-
data = AnsibleInventoryConnector.make_names_data(
|
|
44
|
-
inventory_filename=path.join(
|
|
45
|
-
"tests",
|
|
46
|
-
"deploy",
|
|
47
|
-
"inventories",
|
|
48
|
-
"inventory_ansible.json",
|
|
49
|
-
),
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
assert sorted(data) == sorted(TEST_DATA)
|
|
53
|
-
|
|
54
|
-
def test_make_names_data_yaml(self):
|
|
55
|
-
data = AnsibleInventoryConnector.make_names_data(
|
|
56
|
-
inventory_filename=path.join(
|
|
57
|
-
"tests",
|
|
58
|
-
"deploy",
|
|
59
|
-
"inventories",
|
|
60
|
-
"inventory_ansible.yml",
|
|
61
|
-
),
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
assert sorted(data) == sorted(TEST_DATA)
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
from unittest import TestCase
|
|
3
|
-
from unittest.mock import mock_open, patch
|
|
4
|
-
|
|
5
|
-
from pyinfra.api.exceptions import InventoryError
|
|
6
|
-
from pyinfra.connectors.mech import MechInventoryConnector, get_mech_options
|
|
7
|
-
|
|
8
|
-
FAKE_MECH_OPTIONS = {
|
|
9
|
-
"groups": {
|
|
10
|
-
"ubuntu16": ["mygroup"],
|
|
11
|
-
},
|
|
12
|
-
"data": {
|
|
13
|
-
"centos7": {
|
|
14
|
-
"somedata": "somevalue",
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
}
|
|
18
|
-
FAKE_MECH_OPTIONS_DATA = json.dumps(FAKE_MECH_OPTIONS)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def fake_mech_shell(command, splitlines=None):
|
|
22
|
-
if command == "mech ls":
|
|
23
|
-
return [
|
|
24
|
-
"NAME ADDRESS BOX VERSION PATH", # noqa: E501
|
|
25
|
-
"ubuntu16 192.168.2.226 bento/ubuntu-16.04 201912.04.0 /Users/bob/somedir/ubuntu16", # noqa: E501
|
|
26
|
-
"centos7 192.168.2.227 bento/centos-7 201912.05.0 /Users/bob/somedir/centos7", # noqa: E501
|
|
27
|
-
"centos6 poweroff bento/centos-6 201912.04.0 /Users/bob/somedir/centos6", # noqa: E501
|
|
28
|
-
"fedora31 bento/fedora-31 201912.04.0 /Users/bob/somedir/fedora31", # noqa: E501
|
|
29
|
-
]
|
|
30
|
-
if command == "mech ssh-config ubuntu16":
|
|
31
|
-
return [
|
|
32
|
-
"Host ubuntu16",
|
|
33
|
-
" User vagrant",
|
|
34
|
-
" Port 22",
|
|
35
|
-
" UserKnownHostsFile /dev/null",
|
|
36
|
-
" StrictHostKeyChecking no",
|
|
37
|
-
" PasswordAuthentication no",
|
|
38
|
-
" IdentityFile path/to/key",
|
|
39
|
-
" IdentitiesOnly yes",
|
|
40
|
-
" LogLevel FATAL",
|
|
41
|
-
" HostName 192.168.2.226",
|
|
42
|
-
"",
|
|
43
|
-
]
|
|
44
|
-
if command == "mech ssh-config centos7":
|
|
45
|
-
return [
|
|
46
|
-
"Host centos7",
|
|
47
|
-
" User vagrant",
|
|
48
|
-
" Port 22",
|
|
49
|
-
" UserKnownHostsFile /dev/null",
|
|
50
|
-
" StrictHostKeyChecking no",
|
|
51
|
-
" PasswordAuthentication no",
|
|
52
|
-
" IdentityFile path/to/key",
|
|
53
|
-
" IdentitiesOnly yes",
|
|
54
|
-
" LogLevel FATAL",
|
|
55
|
-
" HostName 192.168.2.227",
|
|
56
|
-
"",
|
|
57
|
-
]
|
|
58
|
-
if command == "mech ssh-config centos6":
|
|
59
|
-
return [
|
|
60
|
-
"ERROR: Error: The virtual machine is not powered on: /Users/bob/debian8/.mech/debian-8.11-amd64.vmx", # noqa: E501
|
|
61
|
-
"This Mech machine is reporting that it is not yet ready for SSH. Make",
|
|
62
|
-
"sure your machine is created and running and try again. Additionally,",
|
|
63
|
-
"check the output of `mech status` to verify that the machine is in the",
|
|
64
|
-
"state that you expect.",
|
|
65
|
-
]
|
|
66
|
-
|
|
67
|
-
return []
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
@patch("pyinfra.connectors.mech.local.shell", fake_mech_shell)
|
|
71
|
-
class TestMechConnector(TestCase):
|
|
72
|
-
def tearDown(self):
|
|
73
|
-
get_mech_options.cache = {}
|
|
74
|
-
|
|
75
|
-
@patch(
|
|
76
|
-
"pyinfra.connectors.mech.open",
|
|
77
|
-
mock_open(read_data=FAKE_MECH_OPTIONS_DATA),
|
|
78
|
-
create=True,
|
|
79
|
-
)
|
|
80
|
-
@patch("pyinfra.connectors.mech.path.exists", lambda path: True)
|
|
81
|
-
def test_make_names_data_with_options(self):
|
|
82
|
-
data = MechInventoryConnector.make_names_data()
|
|
83
|
-
|
|
84
|
-
assert data == [
|
|
85
|
-
(
|
|
86
|
-
"@mech/ubuntu16",
|
|
87
|
-
{
|
|
88
|
-
"ssh_port": "22",
|
|
89
|
-
"ssh_user": "vagrant",
|
|
90
|
-
"ssh_hostname": "192.168.2.226",
|
|
91
|
-
"ssh_key": "path/to/key",
|
|
92
|
-
},
|
|
93
|
-
["mygroup", "@mech"],
|
|
94
|
-
),
|
|
95
|
-
(
|
|
96
|
-
"@mech/centos7",
|
|
97
|
-
{
|
|
98
|
-
"ssh_port": "22",
|
|
99
|
-
"ssh_user": "vagrant",
|
|
100
|
-
"ssh_hostname": "192.168.2.227",
|
|
101
|
-
"ssh_key": "path/to/key",
|
|
102
|
-
"somedata": "somevalue",
|
|
103
|
-
},
|
|
104
|
-
["@mech"],
|
|
105
|
-
),
|
|
106
|
-
]
|
|
107
|
-
|
|
108
|
-
def test_make_names_data_with_limit(self):
|
|
109
|
-
data = MechInventoryConnector.make_names_data(limit=("ubuntu16",))
|
|
110
|
-
|
|
111
|
-
assert data == [
|
|
112
|
-
(
|
|
113
|
-
"@mech/ubuntu16",
|
|
114
|
-
{
|
|
115
|
-
"ssh_port": "22",
|
|
116
|
-
"ssh_user": "vagrant",
|
|
117
|
-
"ssh_hostname": "192.168.2.226",
|
|
118
|
-
"ssh_key": "path/to/key",
|
|
119
|
-
},
|
|
120
|
-
["@mech"],
|
|
121
|
-
),
|
|
122
|
-
]
|
|
123
|
-
|
|
124
|
-
def test_make_names_data_no_matches(self):
|
|
125
|
-
with self.assertRaises(InventoryError):
|
|
126
|
-
MechInventoryConnector.make_names_data(limit="nope")
|
|
File without changes
|
|
File without changes
|