running pct on host to modify container #793
Replies: 2 comments 1 reply
-
sorry forgot to show my provisioner:
I have also tried (same error)
I have also tried different combinations of the last provisioner, whether it has the full path to pct or not. |
Beta Was this translation helpful? Give feedback.
-
Hi @redpimpernel! Personally I don't use containers much, so can't share any insights on your set up. But the fact that you need to run I think VMs will be better suited for your use case. For VM you can define a cloud-init configuration that will be applied at the first VM boot up. In cloud-init you can adjust almost any aspect of the underlying OS, as well as execute any post-deployment actions. Installing and configuring Ansible is a pretty common task for cloud-init, so you can probably find an example out there that suits your needs. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am trying to create containers and set them up for ansible-pull.
To do this, I need to install Ansible and drop a file on the container as it is provisioned by terraform.
I am trying to use a terraform local provisioner to run pct on the proxmox host and execute a command on the container.
I am getting an error
/bin/sh/ 1: pct not found
.pct works if I call it manually from the web console. I am using username and password as the root user for the terraform provider.
Another local provisioner works which calls sleep to make sure the container comes up before the main provisioner is run.
does anyone know whats happening?
Beta Was this translation helpful? Give feedback.
All reactions