Fix fleet in ESXi too
This commit is contained in:
@@ -310,9 +310,9 @@
|
|||||||
echo -e "\n127.0.0.1 fleet" >>/etc/hosts
|
echo -e "\n127.0.0.1 fleet" >>/etc/hosts
|
||||||
echo -e "\n127.0.0.1 logger" >>/etc/hosts
|
echo -e "\n127.0.0.1 logger" >>/etc/hosts
|
||||||
|
|
||||||
# Set MySQL username and password, create kolide database
|
# Set MySQL username and password, create fleet database
|
||||||
mysql -uroot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'kolide';"
|
mysql -uroot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'fleet';"
|
||||||
mysql -uroot -pkolide -e "create database kolide;"
|
mysql -uroot -pfleet -e "create database fleet;"
|
||||||
|
|
||||||
# Always download the latest release of Fleet
|
# Always download the latest release of Fleet
|
||||||
curl -s https://api.github.com/repos/fleetdm/fleet/releases | grep 'https://github.com' | grep "/fleet.zip" | cut -d ':' -f 2,3 | tr -d '"' | tr -d ' ' | head -1 | wget --progress=bar:force -i -
|
curl -s https://api.github.com/repos/fleetdm/fleet/releases | grep 'https://github.com' | grep "/fleet.zip" | cut -d ':' -f 2,3 | tr -d '"' | tr -d ' ' | head -1 | wget --progress=bar:force -i -
|
||||||
@@ -321,7 +321,7 @@
|
|||||||
cp fleet/linux/fleet /usr/local/bin/fleet && chmod +x /usr/local/bin/fleet
|
cp fleet/linux/fleet /usr/local/bin/fleet && chmod +x /usr/local/bin/fleet
|
||||||
|
|
||||||
# Prepare the DB
|
# Prepare the DB
|
||||||
fleet prepare db --mysql_address=127.0.0.1:3306 --mysql_database=kolide --mysql_username=root --mysql_password=kolide
|
fleet prepare db --mysql_address=127.0.0.1:3306 --mysql_database=fleet --mysql_username=root --mysql_password=fleet
|
||||||
|
|
||||||
# Copy over the certs and service file
|
# Copy over the certs and service file
|
||||||
cp /vagrant/resources/fleet/server.* /opt/fleet/
|
cp /vagrant/resources/fleet/server.* /opt/fleet/
|
||||||
@@ -345,7 +345,7 @@
|
|||||||
fleetctl login --email admin@detectionlab.network --password 'admin123#'
|
fleetctl login --email admin@detectionlab.network --password 'admin123#'
|
||||||
|
|
||||||
# Set the enrollment secret to match what we deploy to Windows hosts
|
# Set the enrollment secret to match what we deploy to Windows hosts
|
||||||
mysql -uroot --password=kolide -e 'use kolide; update enroll_secrets set secret = "enrollmentsecret" where active=1;'
|
mysql -uroot --password=fleet -e 'use fleet; update enroll_secrets set secret = "enrollmentsecret";'
|
||||||
echo "Updated enrollment secret"
|
echo "Updated enrollment secret"
|
||||||
fi
|
fi
|
||||||
register: install_fleet
|
register: install_fleet
|
||||||
|
|||||||
Reference in New Issue
Block a user