From f0e7cda5e4a1d400cfdcf752e9dbead3599459c6 Mon Sep 17 00:00:00 2001 From: "Stefan G. Weichinger" Date: Mon, 21 Jun 2021 19:41:43 +0200 Subject: [PATCH 1/3] WIP: create collection --- .github/workflows/test.yml | 2 +- galaxy.yml | 15 +++++++++++++++ ansible.mk => plugins/lxc_ssh/ansible.mk | 0 lxc_ssh.py => plugins/lxc_ssh/lxc_ssh.py | 0 pyproject.toml => plugins/lxc_ssh/pyproject.toml | 0 plugins/lxc_ssh/setup.cfg | 3 +++ 6 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 galaxy.yml rename ansible.mk => plugins/lxc_ssh/ansible.mk (100%) rename lxc_ssh.py => plugins/lxc_ssh/lxc_ssh.py (100%) rename pyproject.toml => plugins/lxc_ssh/pyproject.toml (100%) create mode 100644 plugins/lxc_ssh/setup.cfg diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6663746..f20fb9a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,7 +43,7 @@ jobs: # check Python syntax - name: Python syntax check - run: python3 -m py_compile lxc_ssh.py + run: python3 -m py_compile plugins/lxc_ssh/lxc_ssh.py # prepare container with LXD installation diff --git a/galaxy.yml b/galaxy.yml new file mode 100644 index 0000000..23fa02d --- /dev/null +++ b/galaxy.yml @@ -0,0 +1,15 @@ +--- +authors: + - TODO +dependencies: + "ansible.netcommon": ">=2.0.1" +license_file: LICENSE +name: lxc_ssh +namespace: ansible +description: Ansible Network Collection for LXC containers and hosts +readme: README.md +repository: https://github.com/my_org/my_collection" +tags: [lxc, lxd, networking] +# NOTE(pabelanger): We create an empty version key to keep ansible-galaxy +# happy. We dynamically inject version info based on git information. +version: null diff --git a/ansible.mk b/plugins/lxc_ssh/ansible.mk similarity index 100% rename from ansible.mk rename to plugins/lxc_ssh/ansible.mk diff --git a/lxc_ssh.py b/plugins/lxc_ssh/lxc_ssh.py similarity index 100% rename from lxc_ssh.py rename to plugins/lxc_ssh/lxc_ssh.py diff --git a/pyproject.toml b/plugins/lxc_ssh/pyproject.toml similarity index 100% rename from pyproject.toml rename to plugins/lxc_ssh/pyproject.toml diff --git a/plugins/lxc_ssh/setup.cfg b/plugins/lxc_ssh/setup.cfg new file mode 100644 index 0000000..45a0146 --- /dev/null +++ b/plugins/lxc_ssh/setup.cfg @@ -0,0 +1,3 @@ +[pycodestyle] +statistics = True +max-line-length = 89 From c1727b4082636c4511dfa282d433ee2ba751321a Mon Sep 17 00:00:00 2001 From: "Stefan G. Weichinger" Date: Mon, 21 Jun 2021 19:55:58 +0200 Subject: [PATCH 2/3] WIP: correct path --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f20fb9a..313db4d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -272,7 +272,7 @@ jobs: run: ansible --version - name: Install plugin for tests - run: cp -af $GITHUB_WORKSPACE/lxc_ssh.py $GITHUB_WORKSPACE/tests/connection_plugins/lxc_ssh.py + run: cp -af $GITHUB_WORKSPACE/plugins/lxc_ssh/lxc_ssh.py $GITHUB_WORKSPACE/tests/connection_plugins/lxc_ssh.py - name: Create empty file for tests run: touch $GITHUB_WORKSPACE/tests/test_empty.txt From 0a79140761c8332ecdb2095a19633b3d7636324d Mon Sep 17 00:00:00 2001 From: "Stefan G. Weichinger" Date: Mon, 21 Jun 2021 20:05:08 +0200 Subject: [PATCH 3/3] WIP: add meta info --- meta/runtime.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 meta/runtime.yml diff --git a/meta/runtime.yml b/meta/runtime.yml new file mode 100644 index 0000000..2ee3c9f --- /dev/null +++ b/meta/runtime.yml @@ -0,0 +1,2 @@ +--- +requires_ansible: '>=2.9.10'