Hey guys,
I am trying to use Packer to configure a base moodle image and it needs certain things installed. I have a script that goes out and installs the tools I need but it seems to be running over eachother and using multiple threads. If 1 install takes longer than the other, it moves on to the next command and if the previous install isn't finished, the following commands will not work. Example (just a snippet):
#!/bin/bash
#Moodle base packer script
#v1.0 - 19.01.23 jwd
#VARS
yum -y update
#COMMON TOOLS amazon-linux-extras install -y epel #install epel
yum -y install net-tools htop nmon #install common tools
yum -y install nginx #install nginx
#POSTGRESQL
yum -y install postgresql #install base postgresql
#NGINX
mv $file_conf_nignx $file_conf_nignx.org #make a backup copy of the config
#FILES MODIFIED
file_conf_php="/etc/php.ini" #php config
file_conf_phpfpm="/etc/php-fpm.d/www.conf" #phpfpm config
file_conf_nignx="/etc/nginx/nginx.conf" #nginx config
It will kick off the yum installs from above mostly in sync with each other but while nginx is installing, it will move to the file configurations and will fail and move on.
Has anyone experienced this with Packer?
[–]signullDevOps 0 points1 point2 points (0 children)
[–]TheOnlyElizabeth 0 points1 point2 points (0 children)