diff options
author | Chris Gavin <chris@chrisgavin.me> | 2019-03-04 13:27:24 +0000 |
---|---|---|
committer | Alicia Cozine <879121+acozine@users.noreply.github.com> | 2019-03-04 07:27:24 -0600 |
commit | 43042682e839a0ddbb26be90461b797afbffc126 (patch) | |
tree | b5b33f4d88853850f432d08af203cf4b98ff4958 /docs | |
parent | d5aabd02baedfc3afa0542941c2f04860cfef984 (diff) | |
download | ansible-43042682e839a0ddbb26be90461b797afbffc126.tar.gz |
Fix an incorrect function call in a documentation example. (#53233)
Diffstat (limited to 'docs')
-rw-r--r-- | docs/docsite/rst/dev_guide/developing_inventory.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/docsite/rst/dev_guide/developing_inventory.rst b/docs/docsite/rst/dev_guide/developing_inventory.rst index 3b62bbed9c..980c12a553 100644 --- a/docs/docsite/rst/dev_guide/developing_inventory.rst +++ b/docs/docsite/rst/dev_guide/developing_inventory.rst @@ -185,7 +185,7 @@ To facilitate this there are a few of helper functions used in the example below for colo in mydata: for server in mydata[colo]['servers']: self.inventory.add_host(server['name']) - self.inventory.set_variable('ansible_host', server['external_ip']) + self.inventory.set_variable(server['name'], 'ansible_host', server['external_ip']) The specifics will vary depending on API and structure returned. But one thing to keep in mind, if the inventory source or any other issue crops up you should ``raise AnsibleParserError`` to let Ansible know that the source was invalid or the process failed. |