provisioners/ansible: minor code formatting change
[ci skip]
This commit is contained in:
parent
850716b220
commit
a0980aa8be
|
@ -17,6 +17,7 @@ module VagrantPlugins
|
||||||
def self.dnf?(machine)
|
def self.dnf?(machine)
|
||||||
machine.communicate.test("/usr/bin/which -s dnf")
|
machine.communicate.test("/usr/bin/which -s dnf")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,7 +7,6 @@ module VagrantPlugins
|
||||||
module AnsibleInstall
|
module AnsibleInstall
|
||||||
|
|
||||||
def self.ansible_install(machine)
|
def self.ansible_install(machine)
|
||||||
|
|
||||||
epel = machine.communicate.execute("#{yum_dnf(machine)} repolist epel | grep -q epel", :error_check => false)
|
epel = machine.communicate.execute("#{yum_dnf(machine)} repolist epel | grep -q epel", :error_check => false)
|
||||||
if epel != 0
|
if epel != 0
|
||||||
machine.communicate.sudo('sudo rpm -i https://dl.fedoraproject.org/pub/epel/epel-release-latest-`rpm -E %dist | sed -n \'s/.*el\([0-9]\).*/\1/p\'`.noarch.rpm')
|
machine.communicate.sudo('sudo rpm -i https://dl.fedoraproject.org/pub/epel/epel-release-latest-`rpm -E %dist | sed -n \'s/.*el\([0-9]\).*/\1/p\'`.noarch.rpm')
|
||||||
|
@ -19,6 +18,7 @@ module VagrantPlugins
|
||||||
def self.yum_dnf(machine)
|
def self.yum_dnf(machine)
|
||||||
machine.communicate.test("/usr/bin/which -s dnf") ? "dnf" : "yum"
|
machine.communicate.test("/usr/bin/which -s dnf") ? "dnf" : "yum"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue