Salt modules for discovering and exposing minion's IP addresses
Project description
spiro-ip
========
A quick and simple module to get information about the various IPs of your salt
minions.
This is meant to be installed on minions.
Installation
============
On minions, run `pip install spiro-ip`
Or, as a state:
```
{% if grains['pythonversion'][0] == 2 %}
{% set pipbin = "/usr/bin/pip2" %}
{% else %}
{% set pipbin = "/usr/bin/pip3" %}
{% endif %}
spiro-ip:
pip.installed:
- bin_env: {{pipbin}}
```
Interface
=========
A number of things are provided:
Grains
------
* `externalip4`, `externalip6`: Queries external services for your IP, useful
if the minion is behind a NAT or other complex network
Modules
-------
* `ip.addrs4`, `ip.addrs6`: Collates information about a minion's IP address
from several sources.
* `network.ipaddrs` / `network.ipaddrs6`
* AWS metadata (if you've set `metadata_server_grains: True`, see the [metadata grain](https://docs.saltstack.com/en/latest/ref/grains/all/salt.grains.metadata.html))
* `externalip4` / `externalip6` grains (above)
Configuration
=============
No configuration is required. However, as mentioned above, it might be useful to
set `metadata_server_grains: True`.
You may find it useful to set `ip.addrs4` / `ip.addrs6` as mine_functions so
that minions can get each other's IP address. Example:
```
mine_functions:
ip.addrs4: []
ip.addrs6: []
```
========
A quick and simple module to get information about the various IPs of your salt
minions.
This is meant to be installed on minions.
Installation
============
On minions, run `pip install spiro-ip`
Or, as a state:
```
{% if grains['pythonversion'][0] == 2 %}
{% set pipbin = "/usr/bin/pip2" %}
{% else %}
{% set pipbin = "/usr/bin/pip3" %}
{% endif %}
spiro-ip:
pip.installed:
- bin_env: {{pipbin}}
```
Interface
=========
A number of things are provided:
Grains
------
* `externalip4`, `externalip6`: Queries external services for your IP, useful
if the minion is behind a NAT or other complex network
Modules
-------
* `ip.addrs4`, `ip.addrs6`: Collates information about a minion's IP address
from several sources.
* `network.ipaddrs` / `network.ipaddrs6`
* AWS metadata (if you've set `metadata_server_grains: True`, see the [metadata grain](https://docs.saltstack.com/en/latest/ref/grains/all/salt.grains.metadata.html))
* `externalip4` / `externalip6` grains (above)
Configuration
=============
No configuration is required. However, as mentioned above, it might be useful to
set `metadata_server_grains: True`.
You may find it useful to set `ip.addrs4` / `ip.addrs6` as mine_functions so
that minions can get each other's IP address. Example:
```
mine_functions:
ip.addrs4: []
ip.addrs6: []
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spiro-ip-0.0.3.tar.gz
(4.2 kB
view details)
Built Distributions
File details
Details for the file spiro-ip-0.0.3.tar.gz
.
File metadata
- Download URL: spiro-ip-0.0.3.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 703f75658398972594fa303b58c4176654342ec90335a771e46739f6cecdc98e |
|
MD5 | ae4a4e267e30a6a2bcb80f74dfa16910 |
|
BLAKE2b-256 | a65de591d8b301fe2a966a33582fc9c37cdda77d44aa49ab7e31b60841420dd6 |
File details
Details for the file spiro_ip-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: spiro_ip-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 100fcc4793c58ba493627599a7a984508b07a9b248987988c78252f244f826bb |
|
MD5 | 4fa5a131303cb3598fcfefde7555aa96 |
|
BLAKE2b-256 | 7edab3badc7a71ccdfbde6ad36ae4ce1a544964fe820d3003ccbce615bba5658 |
File details
Details for the file spiro_ip-0.0.3-py2-none-any.whl
.
File metadata
- Download URL: spiro_ip-0.0.3-py2-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d34339cd40036d8db0c1f5c403cae51c83132491906da153294748b4f2821a52 |
|
MD5 | 3527087a5f3cfe5e66e0c258b1bbea7f |
|
BLAKE2b-256 | bf3723c493b22646fc734884f8f6e720f3f740601d0ef4a2d902aa385e4c2e84 |