Closed grenade closed 3 years ago
I'm not sure I agree with this. YAML and INI are two different formats (where INI is closer to TOML rather than YAML).
I'm not sure I agree with this. YAML and INI are two different formats (where INI is closer to TOML rather than YAML).
correct. that is the reason for this pr.
the inventory file does not contain yaml and therefore currently has an incorrect file extension of .yml
.
here is the contents of inventory.sample (which users are directed to base their inventory.yml on):
# Specify the nodes to setup. You can add more or remove entries, as you wish.
# Validator 0
[validator_0]
147.75.76.65
# NOTE: optional variables can just be removed.
[validator_0:vars]
ansible_user=alice
# Set an individual node name (optional)
node_name='Alice Validator'
# Setup one or multiple telemetry endpoints (optional)
telemetry_url='wss://telemetry.polkadot.io/submit/,wss://telemetry.polkadot.io/submit/'
# Only log specify levels, e.g. warnings (optional)
logging_filter='sync=warn,afg=warn,babe=warn'
# Location for database, keys, etc (optional)
base_path='/mnt/volume'
# Setup a nginx reverse proxy in front of the binary (optional). Disabled by default.
enable_reverse_proxy = false
# Any additional flags passed on to the 'polkadot' binary (optional)
additional_flags = '--no-prometheus --no-mdns'
# Validator 1
[validator_1]
162.12.35.55
[validator_1:vars]
ansible_user=bob
telemetry_url=wss://telemetry.polkadot.io/submit/
logging_filter='sync=warn,afg=warn,babe=warn'
# ## Group all nodes
[validator:children]
validator_0
validator_1
# Common variables
[all:vars]
# Project name. Will be used as a prefix for the auto-generated node names
# if an individual `nodeName` is not specified.
project=alice-in-wonderland
# Can be left as is.
ansible_ssh_common_args='-o StrictHostKeyChecking=no -o ConnectTimeout=15'
build_dir=$HOME/.config/polkadot-secure-validator/build/w3f/ansible
# Specify which `polkadot` binary to install. Checksum is verified during execution.
polkadot_binary_url='https://github.com/paritytech/polkadot/releases/download/v0.9.1/polkadot'
polkadot_binary_checksum='sha256:00185307376ca0bacf28504e76d4c61ebf84abfba6c31780c9966325add83e1e'
# Specify the chain/network.
#
# For Polkadot:
# ```
# chain=polkadot
# polkadot_network_id=polkadot
# ```
#
# For Kusama:
# ```
# chain=kusama
# polkadot_network_id=ksmcc3
# ```
polkadot_network_id=polkadot
chain=polkadot
# Nginx authentication settings (for Prometheus).
nginx_user='prometheus'
nginx_password='nginx_password'
# Node exporter settings. Disabled by default.
node_exporter_enabled='false'
node_exporter_binary_url='https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz'
node_exporter_binary_checksum='sha256:b2503fd932f85f4e5baf161268854bf5d22001869b84f00fd2d1f57b51b72424'
# Polkadot service restart settings. Disabled by default (recommended). Adjust values accordingly.
polkadot_restart_enabled='false'
polkadot_restart_minute='0'
polkadot_restart_hour='0'
polkadot_restart_day='29'
polkadot_restart_month='2'
polkadot_restart_weekday='1'
# Optional: Restore the chain db from a .7z snapshot
polkadot_db_snapshot_url='https://ksm-rocksdb.polkashots.io/kusama-6658753.RocksDb.7z'
polkadot_db_snapshot_checksum='sha256:4f61a99e4b00acb335aff52f2383880d53b30617c0ae67ac47c611e7bf6971ff'
i believe it is clear to see here that this file does not contain yaml.
correct. that is the reason for this pr.
Ah right, I kind of glimpsed over the fact that our inventory sample is not actual yaml... although Ansible does support it.
How should backwards compatibility be ensured, though? Maybe check for inventory.ini
first and if it does not exist, check for inventory.yaml
?
EDIT: Sorry for the late response.
use an extension that correctly reflects the file contents.
inventory is created by copying inventory.sample to a new file which is referenced elsewhere in this repo as inventory.yml or my_inventory.yml
the incorrect yaml file extension is confusing and misleading both for users and text editor syntax highlighters
this pr renames references to inventory.yml and my_inventory.yml as inventory.ini to remove this confusion