hashicorp/vagrant · error

vagrant.provisioners.ansible.ansible_host_pattern_detected

Error message

vagrant.provisioners.ansible.ansible_host_pattern_detected

What it means

Error "vagrant.provisioners.ansible.ansible_host_pattern_detected" thrown in hashicorp/vagrant.

Source

Thrown at plugins/provisioners/ansible/provisioner/base.rb:285

          # This "abstract" step must create the inventory file and
          # return its location path
          # TODO: explain possible race conditions, etc.
          @inventory_path = ship_generated_inventory(inventory)
        end

        # Write out groups information.
        # All defined groups will be included, but only supported
        # machines and defined child groups will be included.
        def generate_inventory_groups
          groups_of_groups = {}
          defined_groups = []
          group_vars = {}
          inventory_groups = ""

          # Verify if host range patterns exist and warn
          if config.groups.any? { |gm| gm.to_s[RANGE_PATTERN] }
            @machine.ui.warn(I18n.t("vagrant.provisioners.ansible.ansible_host_pattern_detected"))
          end

          config.groups.each_pair do |gname, gmembers|
            if gname.is_a?(Symbol)
              gname = gname.to_s
            end

            if gmembers.is_a?(String)
              gmembers = gmembers.split(/\s+/)
            elsif gmembers.is_a?(Hash)
              gmembers = gmembers.each.collect{ |k, v| "#{k}=#{v}" }
            elsif !gmembers.is_a?(Array)
              gmembers = []
            end

            if gname.end_with?(":children")
              groups_of_groups[gname] = gmembers
              defined_groups << gname.sub(/:children$/, '')

View on GitHub (pinned to 35f3160f4a)

When it happens

Trigger: Thrown at plugins/provisioners/ansible/provisioner/base.rb:285 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21). Data as JSON: /api/errors/ede27d6983b3d299. Report an issue: GitHub.