dofaucet
tl;dr
Read YAML-formatted ansible inventory, create digitalocean droplets accordingly.
Neat tricks:
- creates DNS records for both internal and external droplet IPs
- adds ssh pubkeys to droplets (only keys already uploaded to DO)
- adds alls created droplets to a project so they're easy to identify
Example usage
Inventory
foo.yml
all:
vars:
do_ssh_key_names: ['my_key', 'my_friends_key']
dofaucet_dnsroot: example.com
do_project: test_webstack_ansible
do_image_slug: fedora-28-x64
foohosts:
vars:
do_tags: foohosts
hosts:
foo.infra.example.com
barhosts:
vars:
do_tags: barhosts
# the bar app needs more ram
do_size_slug: s-1vcpu-2gb
hosts:
bar.infra.example.com
dofaucet CLI
dofaucet --token 23234242 --project foo --inventory foo.yml
future ideas
Ansible is python3, so we could use the native ansible functionality to parse the inventory. Example code:
from ansible.parsing.dataloader import DataLoader
from ansible.vars.manager import VariableManager
from ansible.inventory.manager import InventoryManager
loader = DataLoader()
inventory = InventoryManager(loader=loader, sources='~/inventory.yml')
variable_manager = VariableManager(loader=loader, inventory=inventory)
Metadata
Release files for dofaucet 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dofaucet-0.0.2.tar.gz | 5.4 kB | Without provenance | Details for dofaucet-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dofaucet-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for dofaucet-0.0.2-py3-none-any.whl |
Total release size: 12.6 kB
Release files / dofaucet-0.0.2.tar.gz
| Download URL | dofaucet-0.0.2.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e2e068758ca57a9b663da73896a856ca7bd2b08dad882185e85021682ded736
|
|
BLAKE2b-256 checksum How to use checksums |
6ccd63eb09ccfdf1994a320d3b029452a8adf13927cf22664dd7dccc76361e55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
|
Release files / dofaucet-0.0.2-py3-none-any.whl
| Download URL | dofaucet-0.0.2-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
980a334b7ad0ba466f165f6a11a714165cf1b9fba6bdd053e9421a90d26edc0f
|
|
BLAKE2b-256 checksum How to use checksums |
3f8f348e97280f52b74c1fdc6b96f2ebf7f445d0be2da9580c13f765ec6d3b70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
|
Security for dofaucet 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.