{"record":{"id":"6c4f8ecd8363a4bb","repo":"hashicorp/vagrant","slug":"the-podman-post-install-provisioner-cannot-also-ta","errorCode":null,"errorMessage":"The Podman post-install provisioner cannot also take a Podman post-install\nprovisioner","messagePattern":"The Podman post-install provisioner cannot also take a Podman post-install\nprovisioner","errorType":"exception","errorClass":"VagrantPlugins::PodmanProvisioner::PodmanError","httpStatus":null,"severity":"error","filePath":"plugins/provisioners/podman/config.rb","lineNumber":23,"sourceCode":"\nmodule VagrantPlugins\n  module PodmanProvisioner\n    class Config < VagrantPlugins::ContainerProvisioner::Config\n      attr_accessor :kubic\n\n      def initialize\n        super()\n        @kubic = UNSET_VALUE\n      end\n\n      def finalize!\n        super()\n        @kubic = false if @kubic == UNSET_VALUE\n      end\n\n      def post_install_provision(name, **options, &block)\n        # Abort\n        raise PodmanError, :wrong_provisioner if options[:type] == \"podman\"\n\n        proxy = VagrantPlugins::Kernel_V2::VMConfig.new\n        proxy.provision(name, **options, &block)\n        @post_install_provisioner = proxy.provisioners.first\n      end\n    end\n  end\nend\n","sourceCodeStart":5,"sourceCodeEnd":32,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/provisioners/podman/config.rb#L5-L32","documentation":"Raised by PodmanProvisioner::Config#post_install_provision when the auxiliary provisioner's `options[:type]` equals \"podman\". Identical guard to the docker provisioner's: the post-install hook is meant for one non-Podman provisioner (typically shell) that runs right after Podman install; nesting a podman provisioner would recurse install/start logic, so the config call aborts immediately.","triggerScenarios":"Calling `podman.post_install_provision \"name\", type: \"podman\"` in the Vagrantfile's podman provisioner block.","commonSituations":"Assuming post_install_provision is a generic provisioner list and passing a podman block; porting docker examples and swapping only the type string.","solutions":["Use type \"shell\" (or file/ansible etc.) for post-install work: `p.post_install_provision \"setup\", type: \"shell\", inline: \"...\"`","Put podman settings (images, kubic, etc.) directly on the podman provisioner block instead"],"exampleFix":"# Vagrantfile - before\nconfig.vm.provision \"podman\" do |p|\n  p.post_install_provision \"extra\", type: \"podman\"\nend\n\n# Vagrantfile - after\nconfig.vm.provision \"podman\" do |p|\n  p.images = [\"alpine\"]\n  p.post_install_provision \"msg\", type: \"shell\", inline: \"echo podman ready\"\nend","handlingStrategy":"validation","validationCode":"# Keep post-install to a shell step\ntype = \"shell\"\nraise \"podman post_install_provision cannot be type podman\" if type == \"podman\"\np.post_install_provision \"setup\", type: type, inline: \"echo ok\"","typeGuard":"def valid_post_install_type?(type)\n  !type.nil? && type != \"podman\"\nend","tryCatchPattern":null,"preventionTips":["Mirror the docker rule: podman settings go on the podman block; only auxiliary shell/file steps go in post_install_provision","Lint Vagrantfiles in CI (a simple grep for 'post_install_provision.*type: \"podman\"' catches this class)"],"tags":["podman","provisioning","vagrant","configuration"],"backgroundTag":"invalid-provisioner-type","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}