Sha256: eece2e13af9b1d49b4b09db692325999a99b78cc964aef92a98f855264bb1933
Contents?: true
Size: 610 Bytes
Versions: 54
Compression:
Stored size: 610 Bytes
Contents
module VagrantPlugins module Ansible module Cap module Guest module POSIX module AnsibleInstalled # Check if Ansible is installed (at the given version). # @return [true, false] def self.ansible_installed(machine, version) command = 'test -x "$(command -v ansible)"' if !version.empty? command << "&& ansible --version | grep 'ansible #{version}'" end machine.communicate.test command, sudo: false end end end end end end end
Version data entries
54 entries across 50 versions & 5 rubygems