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
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
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
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:
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
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
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