I think i developed stackscript but not executing on server
Hello ,
I am new user to linode + tearraform+ stackscript .
using terraform i developed stackscript to install Mysql DB using terraform.
Using below code instance is getting provisioned but script commands are not getting executed on provisioned server as part of provision
terraform code -- do you see any issue?
Any suggestion, please !!!
#
resource "linode_stackscript" "mysqldb" {
label = "mynode"
description = "Installs a Package"
script = <<EOF
!/bin/bash
sudo yum update -y
sudo yum install wget -y
sudo yum install tar -y
cd /root
sudo wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
sudo rpm -Uvh mysql80-community-release-el7-3.noarch.rpm
sudo yum install mysql-server -y
sudo systemctl start mysqld
sudo systemctl status mysqld
EOF
images = ["linode/centos7", "linode/centos8"]
rev_note = "initial version"
}
#
Getting message in lish is
Welcome to stackscript. stackscript is starting up …
env: '/root/stackscript': No such file or directory
Although on server stackscript file present with all the installation steps provided in above program - it simply not executing
1 Reply
I answered your other community post which I believe should answer this question as well.