Twigs can help discover multiple hosts easily using remote hosts discovery.
Twigs remote discovery for hosts uses a CSV (comma-separate values) file which provides details about the hosts to be discovered. The CSV format has support for specifying individual remote hosts via hostname or IP address and you can specify a CIDR (Classless Inter-Domain Routing) or subnet range to discover hosts in your GCP cloud. You can read more details about the format of the CSV file here.
It is recommended that you secure the credentials shared in the CSV file using the ‘—secure’ option provided by twigs. This can done by following the steps below:
Assume that you have created remote_hosts.csv which contains credentials in clear text.
Run the following command to secure the file:
twigs host --host_list remote_hosts.csv --secure
Open the remote_hosts.csv file to confirm that the credentials are secured if you want.
You can follow the steps below for remote hosts discovery:
Open a new shell / terminal
Check that twigs is installed and running properly by running below command:
twigs host -h
You need the following information to run twigs command:
remote_hosts.csv file created earlier as mentioned in pre-requisites section