distro/tests: select corect Python interpreter for ansible

parent b8d34f85
......@@ -10,6 +10,9 @@ Vagrant.configure(2) do |config|
config.vm.define "centos7_knot-dns" do |machine|
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "../knot-dns-test.yaml"
ansible.extra_vars = {
ansible_python_interpreter: "/usr/bin/python2"
}
end
end
......
......@@ -10,6 +10,9 @@ Vagrant.configure(2) do |config|
config.vm.define "fedora28_knot-dns" do |machine|
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "../knot-dns-test.yaml"
ansible.extra_vars = {
ansible_python_interpreter: "/usr/bin/python3"
}
end
end
......
......@@ -10,6 +10,9 @@ Vagrant.configure(2) do |config|
config.vm.define "fedora29_knot-dns" do |machine|
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "../knot-dns-test.yaml"
ansible.extra_vars = {
ansible_python_interpreter: "/usr/bin/python3"
}
end
end
......
......@@ -5,7 +5,6 @@
become: true
vars:
ansible_python_interpreter: /usr/bin/python2
dig_package:
Debian: dnsutils
Ubuntu: dnsutils
......@@ -50,16 +49,12 @@
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:
......
......@@ -10,6 +10,9 @@ Vagrant.configure(2) do |config|
config.vm.define "ubuntu1604_knot-dns" do |machine|
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "../knot-dns-test.yaml"
ansible.extra_vars = {
ansible_python_interpreter: "/usr/bin/python3"
}
end
end
......
......@@ -10,6 +10,9 @@ Vagrant.configure(2) do |config|
config.vm.define "ubuntu1804_knot-dns" do |machine|
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "../knot-dns-test.yaml"
ansible.extra_vars = {
ansible_python_interpreter: "/usr/bin/python3"
}
end
end
......
......@@ -10,6 +10,9 @@ Vagrant.configure(2) do |config|
config.vm.define "ubuntu1810_knot-dns" do |machine|
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "../knot-dns-test.yaml"
ansible.extra_vars = {
ansible_python_interpreter: "/usr/bin/python3"
}
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment