# testnet-ops ## Installation - Install [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-and-upgrading-ansible-with-pip) - Add location of the directory containing the ansible binary to your `PATH` - Set Locale Encoding to `UTF-8` Ansible requires the locale encoding to be `UTF-8`. You can either use the `LANG` prefix when running Ansible commands or set the system-wide locale - Option 1: Use `LANG` Prefix in Commands If you prefer not to change the system-wide locale, you can use the `LANG` prefix when running Ansible commands: ```bash LANG=en_US.UTF-8 ansible-playbook your_playbook.yml ``` - Option 2: Set System-Wide Locale - Edit the `/etc/default/locale` file: ```bash sudo nano /etc/default/locale ``` - Set the `LANG` variable to en_US.UTF-8: ``` LANG="en_US.UTF-8" ``` - Reboot your system or log out and log back in to apply the changes - Reference: ## Setup Remote Hosts To run the playbook on a remote machine, setup the required ansible inventory: - Create a new `hosts.ini` file: ```bash cp example-hosts.ini hosts.ini ``` - Edit the [`hosts.ini`](./hosts.ini) file to run the playbook on a remote machine: ```bash [] ansible_host= ansible_user= ansible_ssh_common_args='-o ForwardAgent=yes' ``` - Replace `` with the appropriate host group for the deployment - Replace `` with the alias of your choice - Replace `` with the IP address or hostname of the target machine - Replace `` with the SSH username (e.g., dev, ubuntu) - Verify that you are able to connect to the host using the following command ```bash ansible all -m ping -i hosts.ini -k # Expected output: # | SUCCESS => { # "ansible_facts": { # "discovered_interpreter_python": "/usr/bin/python3.10" # }, # "changed": false, # "ping": "pong" # } ``` ## Playbooks - [l2-setup](./l2-setup/README.md) - [nitro-node-setup](./nitro-nodes-setup/README.md) - [nitro-bridge-setup](./nitro-bridge-setup/README.md) - [nitro-contracts-setup](./nitro-contracts-setup/)