pyinfra 0.11.dev3__py3-none-any.whl → 3.5.1__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.
Files changed (203) hide show
  1. pyinfra/__init__.py +9 -12
  2. pyinfra/__main__.py +4 -0
  3. pyinfra/api/__init__.py +18 -3
  4. pyinfra/api/arguments.py +406 -0
  5. pyinfra/api/arguments_typed.py +79 -0
  6. pyinfra/api/command.py +274 -0
  7. pyinfra/api/config.py +222 -28
  8. pyinfra/api/connect.py +33 -13
  9. pyinfra/api/connectors.py +27 -0
  10. pyinfra/api/deploy.py +65 -66
  11. pyinfra/api/exceptions.py +67 -18
  12. pyinfra/api/facts.py +253 -202
  13. pyinfra/api/host.py +413 -50
  14. pyinfra/api/inventory.py +121 -160
  15. pyinfra/api/operation.py +432 -262
  16. pyinfra/api/operations.py +273 -260
  17. pyinfra/api/state.py +302 -248
  18. pyinfra/api/util.py +291 -368
  19. pyinfra/connectors/base.py +173 -0
  20. pyinfra/connectors/chroot.py +212 -0
  21. pyinfra/connectors/docker.py +381 -0
  22. pyinfra/connectors/dockerssh.py +297 -0
  23. pyinfra/connectors/local.py +238 -0
  24. pyinfra/connectors/scp/__init__.py +1 -0
  25. pyinfra/connectors/scp/client.py +204 -0
  26. pyinfra/connectors/ssh.py +670 -0
  27. pyinfra/connectors/ssh_util.py +114 -0
  28. pyinfra/connectors/sshuserclient/client.py +309 -0
  29. pyinfra/connectors/sshuserclient/config.py +102 -0
  30. pyinfra/connectors/terraform.py +135 -0
  31. pyinfra/connectors/util.py +410 -0
  32. pyinfra/connectors/vagrant.py +183 -0
  33. pyinfra/context.py +145 -0
  34. pyinfra/facts/__init__.py +7 -6
  35. pyinfra/facts/apk.py +22 -7
  36. pyinfra/facts/apt.py +117 -60
  37. pyinfra/facts/brew.py +100 -15
  38. pyinfra/facts/bsdinit.py +23 -0
  39. pyinfra/facts/cargo.py +37 -0
  40. pyinfra/facts/choco.py +47 -0
  41. pyinfra/facts/crontab.py +195 -0
  42. pyinfra/facts/deb.py +94 -0
  43. pyinfra/facts/dnf.py +48 -0
  44. pyinfra/facts/docker.py +96 -23
  45. pyinfra/facts/efibootmgr.py +113 -0
  46. pyinfra/facts/files.py +630 -58
  47. pyinfra/facts/flatpak.py +77 -0
  48. pyinfra/facts/freebsd.py +70 -0
  49. pyinfra/facts/gem.py +19 -6
  50. pyinfra/facts/git.py +59 -14
  51. pyinfra/facts/gpg.py +150 -0
  52. pyinfra/facts/hardware.py +313 -167
  53. pyinfra/facts/iptables.py +72 -62
  54. pyinfra/facts/launchd.py +44 -0
  55. pyinfra/facts/lxd.py +17 -4
  56. pyinfra/facts/mysql.py +122 -86
  57. pyinfra/facts/npm.py +17 -9
  58. pyinfra/facts/openrc.py +71 -0
  59. pyinfra/facts/opkg.py +246 -0
  60. pyinfra/facts/pacman.py +50 -7
  61. pyinfra/facts/pip.py +24 -7
  62. pyinfra/facts/pipx.py +82 -0
  63. pyinfra/facts/pkg.py +15 -6
  64. pyinfra/facts/pkgin.py +35 -0
  65. pyinfra/facts/podman.py +54 -0
  66. pyinfra/facts/postgres.py +178 -0
  67. pyinfra/facts/postgresql.py +6 -147
  68. pyinfra/facts/rpm.py +105 -0
  69. pyinfra/facts/runit.py +77 -0
  70. pyinfra/facts/selinux.py +161 -0
  71. pyinfra/facts/server.py +746 -285
  72. pyinfra/facts/snap.py +88 -0
  73. pyinfra/facts/systemd.py +139 -0
  74. pyinfra/facts/sysvinit.py +59 -0
  75. pyinfra/facts/upstart.py +35 -0
  76. pyinfra/facts/util/__init__.py +17 -0
  77. pyinfra/facts/util/databases.py +4 -6
  78. pyinfra/facts/util/packaging.py +37 -6
  79. pyinfra/facts/util/units.py +30 -0
  80. pyinfra/facts/util/win_files.py +99 -0
  81. pyinfra/facts/vzctl.py +20 -13
  82. pyinfra/facts/xbps.py +35 -0
  83. pyinfra/facts/yum.py +34 -40
  84. pyinfra/facts/zfs.py +77 -0
  85. pyinfra/facts/zypper.py +42 -0
  86. pyinfra/local.py +45 -83
  87. pyinfra/operations/__init__.py +12 -0
  88. pyinfra/operations/apk.py +98 -0
  89. pyinfra/operations/apt.py +488 -0
  90. pyinfra/operations/brew.py +231 -0
  91. pyinfra/operations/bsdinit.py +59 -0
  92. pyinfra/operations/cargo.py +45 -0
  93. pyinfra/operations/choco.py +61 -0
  94. pyinfra/operations/crontab.py +191 -0
  95. pyinfra/operations/dnf.py +210 -0
  96. pyinfra/operations/docker.py +446 -0
  97. pyinfra/operations/files.py +1939 -0
  98. pyinfra/operations/flatpak.py +94 -0
  99. pyinfra/operations/freebsd/__init__.py +12 -0
  100. pyinfra/operations/freebsd/freebsd_update.py +70 -0
  101. pyinfra/operations/freebsd/pkg.py +219 -0
  102. pyinfra/operations/freebsd/service.py +116 -0
  103. pyinfra/operations/freebsd/sysrc.py +92 -0
  104. pyinfra/operations/gem.py +47 -0
  105. pyinfra/operations/git.py +419 -0
  106. pyinfra/operations/iptables.py +311 -0
  107. pyinfra/operations/launchd.py +45 -0
  108. pyinfra/operations/lxd.py +68 -0
  109. pyinfra/operations/mysql.py +609 -0
  110. pyinfra/operations/npm.py +57 -0
  111. pyinfra/operations/openrc.py +63 -0
  112. pyinfra/operations/opkg.py +88 -0
  113. pyinfra/operations/pacman.py +81 -0
  114. pyinfra/operations/pip.py +205 -0
  115. pyinfra/operations/pipx.py +102 -0
  116. pyinfra/operations/pkg.py +70 -0
  117. pyinfra/operations/pkgin.py +91 -0
  118. pyinfra/operations/postgres.py +436 -0
  119. pyinfra/operations/postgresql.py +30 -0
  120. pyinfra/operations/puppet.py +40 -0
  121. pyinfra/operations/python.py +72 -0
  122. pyinfra/operations/runit.py +184 -0
  123. pyinfra/operations/selinux.py +189 -0
  124. pyinfra/operations/server.py +1099 -0
  125. pyinfra/operations/snap.py +117 -0
  126. pyinfra/operations/ssh.py +216 -0
  127. pyinfra/operations/systemd.py +149 -0
  128. pyinfra/operations/sysvinit.py +141 -0
  129. pyinfra/operations/upstart.py +68 -0
  130. pyinfra/operations/util/__init__.py +12 -0
  131. pyinfra/operations/util/docker.py +251 -0
  132. pyinfra/operations/util/files.py +247 -0
  133. pyinfra/operations/util/packaging.py +336 -0
  134. pyinfra/operations/util/service.py +46 -0
  135. pyinfra/operations/vzctl.py +137 -0
  136. pyinfra/operations/xbps.py +77 -0
  137. pyinfra/operations/yum.py +210 -0
  138. pyinfra/operations/zfs.py +175 -0
  139. pyinfra/operations/zypper.py +192 -0
  140. pyinfra/progress.py +44 -32
  141. pyinfra/py.typed +0 -0
  142. pyinfra/version.py +9 -1
  143. pyinfra-3.5.1.dist-info/METADATA +141 -0
  144. pyinfra-3.5.1.dist-info/RECORD +159 -0
  145. {pyinfra-0.11.dev3.dist-info → pyinfra-3.5.1.dist-info}/WHEEL +1 -2
  146. pyinfra-3.5.1.dist-info/entry_points.txt +12 -0
  147. {pyinfra-0.11.dev3.dist-info → pyinfra-3.5.1.dist-info/licenses}/LICENSE.md +1 -1
  148. pyinfra_cli/__init__.py +1 -0
  149. pyinfra_cli/cli.py +780 -0
  150. pyinfra_cli/commands.py +66 -0
  151. pyinfra_cli/exceptions.py +155 -65
  152. pyinfra_cli/inventory.py +233 -89
  153. pyinfra_cli/log.py +39 -43
  154. pyinfra_cli/main.py +26 -495
  155. pyinfra_cli/prints.py +215 -156
  156. pyinfra_cli/util.py +172 -105
  157. pyinfra_cli/virtualenv.py +25 -20
  158. pyinfra/api/connectors/__init__.py +0 -21
  159. pyinfra/api/connectors/ansible.py +0 -99
  160. pyinfra/api/connectors/docker.py +0 -178
  161. pyinfra/api/connectors/local.py +0 -169
  162. pyinfra/api/connectors/ssh.py +0 -402
  163. pyinfra/api/connectors/sshuserclient/client.py +0 -105
  164. pyinfra/api/connectors/sshuserclient/config.py +0 -90
  165. pyinfra/api/connectors/util.py +0 -63
  166. pyinfra/api/connectors/vagrant.py +0 -155
  167. pyinfra/facts/init.py +0 -176
  168. pyinfra/facts/util/files.py +0 -102
  169. pyinfra/hook.py +0 -41
  170. pyinfra/modules/__init__.py +0 -11
  171. pyinfra/modules/apk.py +0 -64
  172. pyinfra/modules/apt.py +0 -272
  173. pyinfra/modules/brew.py +0 -122
  174. pyinfra/modules/files.py +0 -711
  175. pyinfra/modules/gem.py +0 -30
  176. pyinfra/modules/git.py +0 -115
  177. pyinfra/modules/init.py +0 -344
  178. pyinfra/modules/iptables.py +0 -271
  179. pyinfra/modules/lxd.py +0 -45
  180. pyinfra/modules/mysql.py +0 -347
  181. pyinfra/modules/npm.py +0 -47
  182. pyinfra/modules/pacman.py +0 -60
  183. pyinfra/modules/pip.py +0 -99
  184. pyinfra/modules/pkg.py +0 -43
  185. pyinfra/modules/postgresql.py +0 -245
  186. pyinfra/modules/puppet.py +0 -20
  187. pyinfra/modules/python.py +0 -37
  188. pyinfra/modules/server.py +0 -524
  189. pyinfra/modules/ssh.py +0 -150
  190. pyinfra/modules/util/files.py +0 -52
  191. pyinfra/modules/util/packaging.py +0 -118
  192. pyinfra/modules/vzctl.py +0 -133
  193. pyinfra/modules/yum.py +0 -171
  194. pyinfra/pseudo_modules.py +0 -64
  195. pyinfra-0.11.dev3.dist-info/.DS_Store +0 -0
  196. pyinfra-0.11.dev3.dist-info/METADATA +0 -135
  197. pyinfra-0.11.dev3.dist-info/RECORD +0 -95
  198. pyinfra-0.11.dev3.dist-info/entry_points.txt +0 -3
  199. pyinfra-0.11.dev3.dist-info/top_level.txt +0 -2
  200. pyinfra_cli/__main__.py +0 -40
  201. pyinfra_cli/config.py +0 -92
  202. /pyinfra/{modules/util → connectors}/__init__.py +0 -0
  203. /pyinfra/{api/connectors → connectors}/sshuserclient/__init__.py +0 -0
pyinfra/api/inventory.py CHANGED
@@ -1,18 +1,17 @@
1
- from collections import defaultdict
1
+ from __future__ import annotations
2
2
 
3
- from pyinfra import logger
3
+ from collections import defaultdict
4
+ from typing import TYPE_CHECKING, Any, Iterator
4
5
 
5
- from .connectors import (
6
- ALL_CONNECTORS,
7
- EXECUTION_CONNECTORS,
8
- INVENTORY_CONNECTORS,
9
- )
6
+ from .connectors import get_all_connectors, get_execution_connectors
10
7
  from .exceptions import NoConnectorError, NoGroupError, NoHostError
11
8
  from .host import Host
12
- from .util import FallbackDict
13
9
 
10
+ if TYPE_CHECKING:
11
+ from pyinfra.api.state import State
14
12
 
15
- def extract_name_data(names):
13
+
14
+ def extract_name_data(names: list[Any]):
16
15
  for name in names:
17
16
  data = {}
18
17
 
@@ -23,48 +22,32 @@ def extract_name_data(names):
23
22
  yield name, data
24
23
 
25
24
 
26
- class Inventory(object):
27
- '''
25
+ class Inventory:
26
+ """
28
27
  Represents a collection of target hosts. Stores and provides access to group data,
29
28
  host data and default data for these hosts.
30
29
 
31
30
  Args:
32
31
  names_data: tuple of ``(names, data)``
33
- ssh_user: override SSH user
34
- ssh_port: override SSH port
35
- ssh_key: override SSH key filename
36
- ssh_key_password: override password for the SSH key
37
- ssh_password: override SSH password
38
- **groups: map of group names -> ``(names, data)``
39
- '''
40
-
41
- state = None
42
-
43
- def __init__(
44
- self, names_data,
45
- ssh_user=None, ssh_port=None, ssh_key=None,
46
- ssh_key_password=None, ssh_password=None, **groups
47
- ):
32
+ override_data: dictionary of data overrides
33
+ ssh_*: deprecated, use ``override_data.ssh_*``
34
+ winrm_*: deprecated, use ``override_data.winrm_*``
35
+ **groups: map of group name -> ``(names, data)``
36
+ """
37
+
38
+ state: "State"
39
+ groups: dict[str, list[Host]]
40
+
41
+ @staticmethod
42
+ def empty():
43
+ return Inventory(([], {}))
44
+
45
+ def __init__(self, names_data, override_data=None, **groups):
48
46
  # Setup basics
49
47
  self.groups = defaultdict(list) # lists of Host objects
50
- self.host_data = defaultdict(dict) # dict of name -> data
51
- self.group_data = defaultdict(dict) # dict of name -> data
52
-
53
- # In CLI mode these are --user, --key, etc
54
- override_data = {
55
- 'ssh_user': ssh_user,
56
- 'ssh_key': ssh_key,
57
- 'ssh_key_password': ssh_key_password,
58
- 'ssh_port': ssh_port,
59
- 'ssh_password': ssh_password,
60
- }
61
- # Strip None values
62
- override_data = {
63
- key: value
64
- for key, value in override_data.items()
65
- if value is not None
66
- }
67
- self.override_data = override_data
48
+ self.host_data: dict[str, dict] = defaultdict(dict) # dict of name -> data
49
+ self.group_data: dict[str, dict] = defaultdict(dict) # dict of name -> data
50
+ self.override_data = override_data or {}
68
51
 
69
52
  names, data = names_data
70
53
 
@@ -72,11 +55,14 @@ class Inventory(object):
72
55
  self.data = data
73
56
 
74
57
  # Create the actual host instances and groups
75
- self.hosts = self.make_hosts_and_groups(names, groups)
58
+ self.make_hosts_and_groups(names, groups)
59
+
60
+ def make_hosts_and_groups(self, names, groups) -> None:
61
+ all_connectors = get_all_connectors()
62
+ execution_connectors = get_execution_connectors()
76
63
 
77
- def make_hosts_and_groups(self, names, groups):
78
64
  # Map name -> data
79
- name_to_data = defaultdict(dict)
65
+ name_to_data: dict[str, dict] = defaultdict(dict)
80
66
  # Map name -> group names
81
67
  name_to_group_names = defaultdict(list)
82
68
 
@@ -94,82 +80,61 @@ class Inventory(object):
94
80
  for name, data in extract_name_data(names):
95
81
  name_to_data[name].update(data)
96
82
 
97
- # Now, use the above to fill self.host_data and populate names_executors
98
- names_executors = []
83
+ # Now, use the above to fill self.host_data and populate names_connectors
84
+ names_connectors = []
99
85
 
100
86
  for name, _ in extract_name_data(names):
101
87
  host_data = name_to_data[name]
102
88
 
103
89
  # Default to executing commands with the ssh connector
104
- executor = EXECUTION_CONNECTORS['ssh']
90
+ connector_cls = execution_connectors["ssh"]
105
91
 
106
- # Name is @connector?
107
- if name[0] == '@':
92
+ if name[0] == "@":
108
93
  connector_name = name[1:]
109
94
  arg_string = None
110
95
 
111
- if '/' in connector_name:
112
- connector_name, arg_string = connector_name.split('/', 1)
96
+ if "/" in connector_name:
97
+ connector_name, arg_string = connector_name.split("/", 1)
113
98
 
114
- if connector_name not in ALL_CONNECTORS:
99
+ if connector_name not in get_all_connectors():
115
100
  raise NoConnectorError(
116
- 'Invalid connector: {0}'.format(connector_name),
101
+ "Invalid connector: {0}".format(connector_name),
117
102
  )
118
103
 
119
- # Execution connector? Simple, just set it for ther host
120
- if connector_name in EXECUTION_CONNECTORS:
121
- executor = EXECUTION_CONNECTORS[connector_name]
122
-
123
- # Inventory connector?
124
- if connector_name in INVENTORY_CONNECTORS:
125
- logger.debug('Expanding inventory connector: {0}'.format(
126
- connector_name,
127
- ))
128
-
129
- for name, data, group_names in (
130
- INVENTORY_CONNECTORS[connector_name].make_names_data(arg_string)
131
- ):
132
- # Make a copy of the host data, update with any from
133
- # the connector.
134
- sub_host_data = host_data.copy()
135
- sub_host_data.update(data)
136
-
137
- # Assign the name/data/group_names from the connector
138
- self.host_data[name] = sub_host_data
139
- names_executors.append((name, executor))
140
- name_to_group_names[name].extend(group_names)
141
-
142
- continue
143
-
144
- # Assign the name/data
145
- self.host_data[name] = host_data
146
- names_executors.append((name, executor))
104
+ # Execution connector? Simple, just set it for their host
105
+ if connector_name in execution_connectors:
106
+ connector_cls = execution_connectors[connector_name]
107
+
108
+ names_data = all_connectors[connector_name].make_names_data(arg_string)
109
+ connector_inventory_name = name
110
+ else:
111
+ names_data = [(name, {}, [])]
112
+ connector_inventory_name = None
113
+
114
+ for sub_name, sub_data, sub_groups in names_data:
115
+ # Update any connector data with a copy of the host data (so that
116
+ # host data can override connector data).
117
+ sub_data.update(host_data.copy())
118
+
119
+ # Assign the name/data/groups from the connector
120
+ self.host_data[sub_name] = sub_data
121
+ names_connectors.append((sub_name, connector_cls))
122
+ name_to_group_names[sub_name].extend(sub_groups)
123
+
124
+ # If we have a connector inventory name, copy any groups attached
125
+ # to the newly generated host name.
126
+ if connector_inventory_name:
127
+ name_to_group_names[sub_name].extend(
128
+ name_to_group_names[connector_inventory_name],
129
+ )
147
130
 
148
131
  # Now we can actually make Host instances
149
- hosts = {}
132
+ hosts: dict[str, "Host"] = {}
150
133
 
151
- for name, executor in names_executors:
134
+ for name, connector_cls in names_connectors:
152
135
  host_groups = name_to_group_names[name]
153
136
 
154
- # Create the (waterfall data: override, host, group, global)
155
- host_data = FallbackDict(
156
- self.get_override_data(),
157
- self.get_host_data(name),
158
- self.get_groups_data(host_groups),
159
- self.get_data(),
160
- # Pass the method, rather than data, as this comes from the
161
- # state and can change during deploy(s).
162
- self.get_deploy_data,
163
- )
164
-
165
- # Create the Host object
166
- host = Host(
167
- name,
168
- inventory=self,
169
- groups=name_to_group_names.get(name),
170
- data=host_data,
171
- executor=executor,
172
- )
137
+ host = Host(name, inventory=self, groups=host_groups, connector_cls=connector_cls)
173
138
  hosts[name] = host
174
139
 
175
140
  # And push into any groups
@@ -177,101 +142,107 @@ class Inventory(object):
177
142
  if host not in self.groups[group_name]:
178
143
  self.groups[group_name].append(host)
179
144
 
180
- return hosts
181
-
182
- def __len__(self):
183
- '''
184
- Returns the number of active inventory hosts.
185
- '''
145
+ self.hosts = hosts
186
146
 
187
- if not self.state or not self.state.active_hosts:
188
- return len(self.hosts)
147
+ def __len__(self) -> int:
148
+ """
149
+ Returns the number of inventory hosts.
150
+ """
189
151
 
190
- return len(self.state.active_hosts)
152
+ return len(self.hosts)
191
153
 
192
- def __iter__(self):
193
- '''
194
- Iterates over active inventory hosts.
195
- '''
154
+ def __iter__(self) -> Iterator["Host"]:
155
+ """
156
+ Iterates over all inventory hosts.
157
+ """
196
158
 
197
- if not self.state or not self.state.active_hosts:
198
- return self.iter_all_hosts()
159
+ return iter(self.hosts.values())
199
160
 
161
+ def iter_active_hosts(self) -> Iterator["Host"]:
162
+ """
163
+ Iterates over active inventory hosts.
164
+ """
200
165
  return iter(self.state.active_hosts)
201
166
 
202
- def len_all_hosts(self):
203
- '''
204
- Returns the number of hosts in the inventory, active or not.
205
- '''
206
-
207
- return len(self.hosts)
167
+ def len_active_hosts(self) -> int:
168
+ """
169
+ Returns the number of active inventory hosts.
170
+ """
171
+ return len(self.state.active_hosts)
208
172
 
209
- def iter_all_hosts(self):
210
- '''
211
- Iterates over all inventory hosts, active or not.
212
- '''
173
+ def iter_activated_hosts(self) -> Iterator["Host"]:
174
+ """
175
+ Iterates over activated inventory hosts.
176
+ """
177
+ return iter(self.state.activated_hosts)
213
178
 
214
- return iter(self.hosts.values())
179
+ def len_activated_hosts(self) -> int:
180
+ """
181
+ Returns the number of activated inventory hosts.
182
+ """
183
+ return len(self.state.activated_hosts)
215
184
 
216
- def get_host(self, name, default=NoHostError):
217
- '''
185
+ def get_host(self, name: str, default=NoHostError) -> Host:
186
+ """
218
187
  Get a single host by name.
219
- '''
188
+ """
220
189
 
221
190
  if name in self.hosts:
222
191
  return self.hosts[name]
223
192
 
224
193
  if default is NoHostError:
225
- raise NoHostError('No such host: {0}'.format(name))
194
+ raise NoHostError("No such host: {0}".format(name))
226
195
 
196
+ # TODO: remove default here?
227
197
  return default
228
198
 
229
- def get_group(self, name, default=NoGroupError):
230
- '''
199
+ def get_group(self, name: str, default=NoGroupError) -> list[Host]:
200
+ """
231
201
  Get a list of hosts belonging to a group.
232
- '''
202
+ """
233
203
 
234
204
  if name in self.groups:
235
205
  return self.groups[name]
236
206
 
237
207
  if default is NoGroupError:
238
- raise NoGroupError('No such group: {0}'.format(name))
208
+ raise NoGroupError("No such group: {0}".format(name))
239
209
 
210
+ # TODO: remove default here?
240
211
  return default
241
212
 
242
213
  def get_data(self):
243
- '''
214
+ """
244
215
  Get the base/all data attached to this inventory.
245
- '''
216
+ """
246
217
 
247
218
  return self.data
248
219
 
249
220
  def get_override_data(self):
250
- '''
221
+ """
251
222
  Get override data for this inventory.
252
- '''
223
+ """
253
224
 
254
225
  return self.override_data
255
226
 
256
- def get_host_data(self, hostname):
257
- '''
227
+ def get_host_data(self, hostname: str):
228
+ """
258
229
  Get data for a single host in this inventory.
259
- '''
230
+ """
260
231
 
261
232
  return self.host_data.get(hostname, {})
262
233
 
263
234
  def get_group_data(self, group):
264
- '''
235
+ """
265
236
  Get data for a single group in this inventory.
266
- '''
237
+ """
267
238
 
268
239
  return self.group_data.get(group, {})
269
240
 
270
241
  def get_groups_data(self, groups):
271
- '''
242
+ """
272
243
  Gets aggregated data from a list of groups. Vars are collected in order so, for
273
244
  any groups which define the same var twice, the last group's value will hold.
274
- '''
245
+ """
275
246
 
276
247
  data = {}
277
248
 
@@ -279,13 +250,3 @@ class Inventory(object):
279
250
  data.update(self.get_group_data(group))
280
251
 
281
252
  return data
282
-
283
- def get_deploy_data(self):
284
- '''
285
- Gets any default data attached to the current deploy, if any.
286
- '''
287
-
288
- if self.state and self.state.deploy_data:
289
- return self.state.deploy_data
290
-
291
- return {}