]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
distro/tests: select corect Python interpreter for ansible
authorTomas Krizek <tomas.krizek@nic.cz>
Mon, 7 Jan 2019 16:30:16 +0000 (17:30 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Thu, 10 Jan 2019 09:13:32 +0000 (09:13 +0000)
distro/tests/centos7/Vagrantfile
distro/tests/fedora28/Vagrantfile
distro/tests/fedora29/Vagrantfile
distro/tests/knot-resolver-test.yaml
distro/tests/ubuntu1604/Vagrantfile
distro/tests/ubuntu1804/Vagrantfile
distro/tests/ubuntu1810/Vagrantfile

index df39e1810997c831dfffc2a6f15d3df367428fd0..a03e59996526d43d8a7fa5e96ae95ccdbca908ad 100644 (file)
@@ -10,6 +10,9 @@ Vagrant.configure(2) do |config|
     config.vm.define "centos7_knot-resolver"  do |machine|
         machine.vm.provision "ansible" do |ansible|
             ansible.playbook = "../knot-resolver-test.yaml"
+            ansible.extra_vars = {
+                ansible_python_interpreter: "/usr/bin/python2"
+            }
         end
     end
 
index 72733f226f8799c007526f8a381915be1acd4b19..0171b4fdd4b165f496700fe43045030c99c7776d 100644 (file)
@@ -10,6 +10,9 @@ Vagrant.configure(2) do |config|
     config.vm.define "fedora28_knot-resolver"  do |machine|
         machine.vm.provision "ansible" do |ansible|
             ansible.playbook = "../knot-resolver-test.yaml"
+            ansible.extra_vars = {
+                ansible_python_interpreter: "/usr/bin/python3"
+            }
         end
     end
 
index 8b41f5396ac57a9004b57e05e25b0469f966d6c8..67407e8719ef4a50bd10c8e20a1284ad74d7aab1 100644 (file)
@@ -10,6 +10,9 @@ Vagrant.configure(2) do |config|
     config.vm.define "fedora29_knot-resolver"  do |machine|
         machine.vm.provision "ansible" do |ansible|
             ansible.playbook = "../knot-resolver-test.yaml"
+            ansible.extra_vars = {
+                ansible_python_interpreter: "/usr/bin/python3"
+            }
         end
     end
 
index b049ee589886e203edc76c373323bcb6af325945..33d07aa6d496af5e5fc2bcd894f4340dd6200e20 100644 (file)
@@ -5,7 +5,6 @@
   become: true
 
   vars:
-    ansible_python_interpreter: /usr/bin/python2
     dig_package:
       Debian: dnsutils
       Ubuntu: dnsutils
   vars_files:
     - repos.yaml
 
-  # HACK: Ansible requires Python 2, but it's not installed by default in all distros
   gather_facts: false
   pre_tasks:
-    - name: install python and deps for ansible modules
+    - name: install python3 (Arch)
       raw: |
-        yum install -y python2 python2-dnf libselinux-python || \
-        pacman -Sy python2 --noconfirm || \
-        (zypper --gpg-auto-import-keys refresh && zypper install -y python) || \
-        (apt-get update && apt-get install -y python) || \
-        :
+        (pacman-key --init && pacman-key --populate archlinux && \
+         pacman -Sy python3 --noconfirm) || :
       ignore_errors: true
     - name: gather facts
       setup:
index 83e4588ddc95ff496ecd62639f58d818e793728a..40e049222e6240e559f758d3df4a231bc23c14f3 100644 (file)
@@ -10,6 +10,9 @@ Vagrant.configure(2) do |config|
     config.vm.define "ubuntu1604_knot-resolver"  do |machine|
         machine.vm.provision "ansible" do |ansible|
             ansible.playbook = "../knot-resolver-test.yaml"
+            ansible.extra_vars = {
+                ansible_python_interpreter: "/usr/bin/python3"
+            }
         end
     end
 
index 73698d9acbb517fc8e4c1abf338996574d727f74..57e210d6e95b6dd71affb555ee9fb63c167b2707 100644 (file)
@@ -10,6 +10,9 @@ Vagrant.configure(2) do |config|
     config.vm.define "ubuntu1804_knot-resolver"  do |machine|
         machine.vm.provision "ansible" do |ansible|
             ansible.playbook = "../knot-resolver-test.yaml"
+            ansible.extra_vars = {
+                ansible_python_interpreter: "/usr/bin/python3"
+            }
         end
     end
 
index c763ea47e1cc476ac2c67469edd9a3d810078b18..c560be1f88531a328927d3cf53e9e2782f5074d5 100644 (file)
@@ -10,6 +10,9 @@ Vagrant.configure(2) do |config|
     config.vm.define "ubuntu1810_knot-resolver"  do |machine|
         machine.vm.provision "ansible" do |ansible|
             ansible.playbook = "../knot-resolver-test.yaml"
+            ansible.extra_vars = {
+                ansible_python_interpreter: "/usr/bin/python3"
+            }
         end
     end