spec/lib/.ansible.rb
def docker_pull
    need_pull = true
    Docker::Image.all.each do |img|
      img.info['RepoTags'].each do |tag|
        if tag.match("#{@docker_img}:#{@docker_tag}")
          need_pull = false
          break
        end
      end
    end
    if need_pull
      Docker::Image.create('fromImage' => @docker_img, 'tag' => @docker_tag)
    end
  end
# pull the configured base image if not already installed
pull the configured base image if not already installed
pull the configured base image if not already installed
def docker_pull
    need_pull = true
    Docker::Image.all.each do |img|
      img.info['RepoTags'].each do |tag|
        if tag.match("#{@docker_img}:#{@docker_tag}")
          need_pull = false
          break
        end
      end
    end
    if need_pull
      Docker::Image.create('fromImage' => @docker_img, 'tag' => @docker_tag)
    end
  end
def docker_pull need_pull = true Docker :: Image . all . each do | img | img . info [ 'RepoTags' ] . each do | tag | if tag . match ( "#{@docker_img}:#{@docker_tag}" ) need_pull = false break end end end if need_pull Docker :: Image . create ( 'fromImage' => @docker_img , 'tag' => @docker_tag ) end end
pull the configured base image if not already installed
pull the configured base image if not already installed