[arch-commits] Commit in molecule-vagrant/repos/community-any (3 files)

Ike Devolder idevolder at gemini.archlinux.org
Thu Nov 18 08:21:23 UTC 2021


    Date: Thursday, November 18, 2021 @ 08:21:23
  Author: idevolder
Revision: 1052063

archrelease: copy trunk to community-any

Added:
  molecule-vagrant/repos/community-any/105.patch
    (from rev 1052062, molecule-vagrant/trunk/105.patch)
  molecule-vagrant/repos/community-any/PKGBUILD
    (from rev 1052062, molecule-vagrant/trunk/PKGBUILD)
Deleted:
  molecule-vagrant/repos/community-any/PKGBUILD

-----------+
 105.patch |  151 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 PKGBUILD  |   83 +++++++++++++++++---------------
 2 files changed, 195 insertions(+), 39 deletions(-)

Copied: molecule-vagrant/repos/community-any/105.patch (from rev 1052062, molecule-vagrant/trunk/105.patch)
===================================================================
--- 105.patch	                        (rev 0)
+++ 105.patch	2021-11-18 08:21:23 UTC (rev 1052063)
@@ -0,0 +1,151 @@
+From 2d481a3e8d52a0ba9f7be7834571766178b0e806 Mon Sep 17 00:00:00 2001
+From: Arnaud Patard <apatard at hupstream.com>
+Date: Sat, 15 May 2021 20:59:40 +0200
+Subject: [PATCH 1/2] molecule_vagrant/test/functional: Add scenario for
+ networking
+
+There's currently no test case for networking, which seems a bad
+idea, so add one.
+The verifier playbook is minimal: it's only checking that there
+are 3 interfaces (lo, management network, private network).
+
+Signed-off-by: Arnaud Patard <apatard at hupstream.com>
+---
+ .github/workflows/tox.yml                     |  8 +++----
+ molecule_vagrant/test/functional/test_func.py |  3 ++-
+ .../scenarios/molecule/network/converge.yml   | 11 +++++++++
+ .../scenarios/molecule/network/molecule.yml   | 23 +++++++++++++++++++
+ .../scenarios/molecule/network/verify.yml     | 10 ++++++++
+ 5 files changed, 50 insertions(+), 5 deletions(-)
+ create mode 100644 molecule_vagrant/test/scenarios/molecule/network/converge.yml
+ create mode 100644 molecule_vagrant/test/scenarios/molecule/network/molecule.yml
+ create mode 100644 molecule_vagrant/test/scenarios/molecule/network/verify.yml
+
+diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml
+index f2ffb9d..5b4fb53 100644
+--- a/.github/workflows/tox.yml
++++ b/.github/workflows/tox.yml
+@@ -26,13 +26,13 @@ jobs:
+         include:
+           - tox_env: lint
+           - tox_env: py36
+-            PREFIX: PYTEST_REQPASS=5
++            PREFIX: PYTEST_REQPASS=6
+           - tox_env: py36-devel
+-            PREFIX: PYTEST_REQPASS=5
++            PREFIX: PYTEST_REQPASS=6
+           - tox_env: py39
+-            PREFIX: PYTEST_REQPASS=5
++            PREFIX: PYTEST_REQPASS=6
+           - tox_env: py39-devel
+-            PREFIX: PYTEST_REQPASS=5
++            PREFIX: PYTEST_REQPASS=6
+           - tox_env: packaging
+ 
+     steps:
+diff --git a/molecule_vagrant/test/functional/test_func.py b/molecule_vagrant/test/functional/test_func.py
+index 3b21fa9..826b9eb 100644
+--- a/molecule_vagrant/test/functional/test_func.py
++++ b/molecule_vagrant/test/functional/test_func.py
+@@ -71,7 +71,8 @@ def test_command_init_scenario(temp_dir):
+ 
+ 
+ @pytest.mark.parametrize(
+-    "scenario", [("vagrant_root"), ("config_options"), ("provider_config_options")]
++    "scenario",
++    [("vagrant_root"), ("config_options"), ("provider_config_options"), ("network")],
+ )
+ def test_vagrant_root(temp_dir, scenario):
+ 
+diff --git a/molecule_vagrant/test/scenarios/molecule/network/converge.yml b/molecule_vagrant/test/scenarios/molecule/network/converge.yml
+new file mode 100644
+index 0000000..cd8ecfb
+--- /dev/null
++++ b/molecule_vagrant/test/scenarios/molecule/network/converge.yml
+@@ -0,0 +1,11 @@
++---
++- name: Converge
++  hosts: all
++  gather_facts: false
++  become: true
++  tasks:
++    - name: sample task  # noqa 305
++      shell:
++        cmd: uname
++        warn: false
++      changed_when: false
+diff --git a/molecule_vagrant/test/scenarios/molecule/network/molecule.yml b/molecule_vagrant/test/scenarios/molecule/network/molecule.yml
+new file mode 100644
+index 0000000..983fcc8
+--- /dev/null
++++ b/molecule_vagrant/test/scenarios/molecule/network/molecule.yml
+@@ -0,0 +1,23 @@
++---
++dependency:
++  name: galaxy
++driver:
++  name: vagrant
++  provider:
++    name: libvirt
++platforms:
++  - name: instance
++    box: ${TESTBOX:-centos/7}
++    provider_options:
++      driver: ${VIRT_DRIVER:-kvm}
++      # using session with network leads to troubles
++      qemu_use_session: false
++    provision: true
++    interfaces:
++      - network_name: private_network
++        type: dhcp
++        auto_config: true
++provisioner:
++  name: ansible
++verifier:
++  name: ansible
+diff --git a/molecule_vagrant/test/scenarios/molecule/network/verify.yml b/molecule_vagrant/test/scenarios/molecule/network/verify.yml
+new file mode 100644
+index 0000000..cc68b75
+--- /dev/null
++++ b/molecule_vagrant/test/scenarios/molecule/network/verify.yml
+@@ -0,0 +1,10 @@
++---
++- hosts: all
++  gather_facts: true
++  gather_subset:
++    - network
++  tasks:
++    - name: Check that there are 3 interfaces
++      assert:
++        that:
++          - "{{ ansible_interfaces | length == 3 }}"
+
+From c3ed4d5f0ee892651233b15c5b485d15ee539497 Mon Sep 17 00:00:00 2001
+From: Arnaud Patard <apatard at hupstream.com>
+Date: Sat, 15 May 2021 21:02:29 +0200
+Subject: [PATCH 2/2] molecule_vagrant/modules/vagrant.py: Fix network template
+
+In the changes introduced by the commit Vagrant yaml removal
+(0c1aed1fb550), the network definition in the jinja template
+got the loop iterator variable wrong. Use the right one.
+
+Fixes: #104
+
+Signed-off-by: Arnaud Patard <apatard at hupstream.com>
+---
+ molecule_vagrant/modules/vagrant.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/molecule_vagrant/modules/vagrant.py b/molecule_vagrant/modules/vagrant.py
+index 22f205d..532d11b 100644
+--- a/molecule_vagrant/modules/vagrant.py
++++ b/molecule_vagrant/modules/vagrant.py
+@@ -219,7 +219,7 @@
+     # Network
+     ##
+     {% for n in instance.networks %}
+-    c.vm.network "{{ network.name }}", {{ dict2args(network.options) }}
++    c.vm.network "{{ n.name }}", {{ dict2args(n.options) }}
+     {% endfor %}
+ 
+     ##

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-11-18 08:21:17 UTC (rev 1052062)
+++ PKGBUILD	2021-11-18 08:21:23 UTC (rev 1052063)
@@ -1,39 +0,0 @@
-# Maintainer: Ike Devolder <ike DOT devolder AT gmail DOT com>
-# Contributor: Marc Straube <email at marcstraube.de>
-
-pkgname=molecule-vagrant
-_module_name=molecule_vagrant
-pkgver=0.6.3
-pkgrel=1
-pkgdesc="Molecule Vangrant Driver"
-arch=('any')
-url="https://github.com/ansible-community/molecule-vagrant"
-license=('MIT')
-depends=('python' 'ansible' 'molecule' 'python-pyaml' 'python-vagrant')
-makedepends=('python-setuptools' 'python-setuptools-scm' 'molecule'
-'python-vagrant' 'python-pyaml' 'python-pip')
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/ansible-community/molecule-vagrant/archive/${pkgver}.tar.gz")
-sha512sums=('09165da30b6d678084760f8bf8ae552a5ece255b98e1cc86e76a9294bcbf720c951641208fad34d926ef3b1a97a0f65d181982ffed6f058413d2bf0846ea846e')
-
-prepare() {
-  cd ${pkgname}-${pkgver}
-  echo "Version: ${pkgver}" > PKG-INFO
-}
-
-build() {
-  cd ${pkgname}-${pkgver}
-  python setup.py build
-}
-
-#check() {
-#  cd ${pkgname}-${pkgver}
-#  python setup.py test
-#}
-
-package() {
-  pylibpath="$(dirname "$(python-config --configdir)")"
-  cd ${pkgname}-${pkgver}
-  python setup.py install -O1 --root="${pkgdir}" --skip-build
-  cp -R ${_module_name}/cookiecutter "${pkgdir}${pylibpath}/site-packages/${_module_name}"
-  cp -R ${_module_name}/playbooks "${pkgdir}${pylibpath}/site-packages/${_module_name}"
-}

Copied: molecule-vagrant/repos/community-any/PKGBUILD (from rev 1052062, molecule-vagrant/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-11-18 08:21:23 UTC (rev 1052063)
@@ -0,0 +1,44 @@
+# Maintainer: Ike Devolder <ike DOT devolder AT gmail DOT com>
+# Contributor: Marc Straube <email at marcstraube.de>
+
+pkgname=molecule-vagrant
+_module_name=molecule_vagrant
+pkgver=0.6.3
+pkgrel=2
+pkgdesc="Molecule Vangrant Driver"
+arch=('any')
+url="https://github.com/ansible-community/molecule-vagrant"
+license=('MIT')
+depends=('python' 'ansible' 'molecule' 'python-pyaml' 'python-vagrant')
+makedepends=('python-setuptools' 'python-setuptools-scm' 'molecule'
+'python-vagrant' 'python-pyaml' 'python-pip')
+source=(
+  "${pkgname}-${pkgver}.tar.gz::https://github.com/ansible-community/molecule-vagrant/archive/${pkgver}.tar.gz"
+  '105.patch'
+)
+sha512sums=('09165da30b6d678084760f8bf8ae552a5ece255b98e1cc86e76a9294bcbf720c951641208fad34d926ef3b1a97a0f65d181982ffed6f058413d2bf0846ea846e'
+            '566eca8d182b50658804b145d793eb4c9182c9499439f63a0a2bd94d13b1908ce084f25e5506f8690bdc7993b06384bf97df91ac5b3f0ea7a3042b328edb107d')
+
+prepare() {
+  cd ${pkgname}-${pkgver}
+  echo "Version: ${pkgver}" > PKG-INFO
+  patch -p1 -i "$srcdir/105.patch"
+}
+
+build() {
+  cd ${pkgname}-${pkgver}
+  python setup.py build
+}
+
+#check() {
+#  cd ${pkgname}-${pkgver}
+#  python setup.py test
+#}
+
+package() {
+  pylibpath="$(dirname "$(python-config --configdir)")"
+  cd ${pkgname}-${pkgver}
+  python setup.py install -O1 --root="${pkgdir}" --skip-build
+  cp -R ${_module_name}/cookiecutter "${pkgdir}${pylibpath}/site-packages/${_module_name}"
+  cp -R ${_module_name}/playbooks "${pkgdir}${pylibpath}/site-packages/${_module_name}"
+}



More information about the arch-commits mailing list