Commits vergleichen

..

Keine gemeinsamen Commits. "527ad350cf803d15d831cf60e2974ae2acd1a0c7" und "1642135c84314836d6f69004a9be7dbf5c353ce5" haben vollständig unterschiedliche Historien.

6 geänderte Dateien mit 10 neuen und 20 gelöschten Zeilen

2
.gitignore vendored
Datei anzeigen

@ -162,4 +162,4 @@ cython_debug/
# ---> Ansible # ---> Ansible
*.retry *.retry
*.tar.gz

Datei anzeigen

@ -19,4 +19,4 @@ New Plugins
Inventory Inventory
~~~~~~~~~ ~~~~~~~~~
- ansible.netcup.scp - Returns Ansible inventory from netcup SCP - sebastian.netcup.scp - Returns Ansible inventory from netcup SCP

Datei anzeigen

@ -6,10 +6,7 @@ changelog:
antsibull-changelog generate antsibull-changelog generate
docs: format docs: format
update-doc ./update_doc
release: changelog docs release: changelog docs
ansible-galaxy collection build ansible-galaxy collection build
upload:
./upload.sh

Datei anzeigen

@ -1,5 +1,5 @@
--- ---
namespace: ansible namespace: sebastian
name: netcup name: netcup
version: 0.1.0 version: 0.1.0
readme: README.md readme: README.md

Datei anzeigen

@ -1,14 +1,13 @@
from xmlrpc.client import ServerProxy from ansible.plugins.inventory import BaseInventoryPlugin
from ansible.inventory.data import InventoryData from ansible.inventory.data import InventoryData
from ansible.parsing.dataloader import DataLoader from ansible.parsing.dataloader import DataLoader
from ansible.plugins.inventory import BaseInventoryPlugin from xmlrpc.client import ServerProxy
from ansible.utils.display import Display
from zeep import Client, Settings from zeep import Client, Settings
from ansible.utils.display import Display
display = Display() display = Display()
class InventoryModule(BaseInventoryPlugin): class InventoryModule(BaseInventoryPlugin):
NAME = "sebastian.netcup.scp" NAME = "sebastian.netcup.scp"
loader: DataLoader loader: DataLoader
@ -60,7 +59,7 @@ class InventoryModule(BaseInventoryPlugin):
inventory.set_variable(nickname, "up", serverinfo["status"] == "online") inventory.set_variable(nickname, "up", serverinfo["status"] == "online")
DOCUMENTATION = r""" DOCUMENTATION = r'''
name: sebastian.netcup.scp name: sebastian.netcup.scp
plugin_type: inventory plugin_type: inventory
short_description: Returns Ansible inventory from netcup SCP short_description: Returns Ansible inventory from netcup SCP
@ -79,4 +78,4 @@ DOCUMENTATION = r"""
- API password to authenticate againt the api. - API password to authenticate againt the api.
- This is different from you SCP password and must be set indipendently from the SCP password - This is different from you SCP password and must be set indipendently from the SCP password
required: true required: true
""" '''

Datei anzeigen

@ -1,6 +0,0 @@
#!/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"