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

Hi @siddharthdex

I answered your other community post which I believe should answer this question as well.

https://www.linode.com/community/questions/21017/deploying-stackscript-image-using-terraform#answer-75479

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct