Commits vergleichen
3 Commits
1642135c84
...
527ad350cf
Autor | SHA1 | Datum |
---|---|---|
Sebastian Tobie | 527ad350cf | |
Sebastian Tobie | 5efc47cccc | |
Sebastian Tobie | a66f30ebad |
|
@ -162,4 +162,4 @@ cython_debug/
|
|||
|
||||
# ---> Ansible
|
||||
*.retry
|
||||
|
||||
*.tar.gz
|
||||
|
|
|
@ -19,4 +19,4 @@ New Plugins
|
|||
Inventory
|
||||
~~~~~~~~~
|
||||
|
||||
- sebastian.netcup.scp - Returns Ansible inventory from netcup SCP
|
||||
- ansible.netcup.scp - Returns Ansible inventory from netcup SCP
|
||||
|
|
5
Makefile
5
Makefile
|
@ -6,7 +6,10 @@ changelog:
|
|||
antsibull-changelog generate
|
||||
|
||||
docs: format
|
||||
./update_doc
|
||||
update-doc
|
||||
|
||||
release: changelog docs
|
||||
ansible-galaxy collection build
|
||||
|
||||
upload:
|
||||
./upload.sh
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
namespace: sebastian
|
||||
namespace: ansible
|
||||
name: netcup
|
||||
version: 0.1.0
|
||||
readme: README.md
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
from ansible.plugins.inventory import BaseInventoryPlugin
|
||||
from xmlrpc.client import ServerProxy
|
||||
|
||||
from ansible.inventory.data import InventoryData
|
||||
from ansible.parsing.dataloader import DataLoader
|
||||
from xmlrpc.client import ServerProxy
|
||||
from zeep import Client, Settings
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin
|
||||
from ansible.utils.display import Display
|
||||
|
||||
from zeep import Client, Settings
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
class InventoryModule(BaseInventoryPlugin):
|
||||
NAME = "sebastian.netcup.scp"
|
||||
loader: DataLoader
|
||||
|
@ -59,7 +60,7 @@ class InventoryModule(BaseInventoryPlugin):
|
|||
inventory.set_variable(nickname, "up", serverinfo["status"] == "online")
|
||||
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
DOCUMENTATION = r"""
|
||||
name: sebastian.netcup.scp
|
||||
plugin_type: inventory
|
||||
short_description: Returns Ansible inventory from netcup SCP
|
||||
|
@ -78,4 +79,4 @@ DOCUMENTATION = r'''
|
|||
- API password to authenticate againt the api.
|
||||
- This is different from you SCP password and must be set indipendently from the SCP password
|
||||
required: true
|
||||
'''
|
||||
"""
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
user=$(yq -r .namespace galaxy.yml)
|
||||
package=$(yq -r .name galaxy.yml)
|
||||
version=$(yq -r .version galaxy.yml)
|
||||
printf "Namespace: %s\nPackage: %s\nVersion: %s\nfile name: %s\n" $user $package $version "$user-$package-$version.tar.gz"
|
||||
curl -u sebastian --upload-file "${user}-${package}-${version}.tar.gz" "https://gitea.sebastian-tobie.de/api/packages/${user}/generic/${package}/${version}/${user}-${package}-${version}.tar.gz"
|
Laden…
In neuem Issue referenzieren