Go to file
2024-09-09 15:32:45 +05:30
l2-setup Move remote host setup to root README 2024-09-09 14:53:06 +05:30
nitro-bridge-setup Update var in template 2024-09-09 15:32:45 +05:30
nitro-contracts-setup Move remote host setup to root README 2024-09-09 14:53:06 +05:30
nitro-nodes-setup Move remote host setup to root README 2024-09-09 14:53:06 +05:30
.gitignore Move remote host setup to root README 2024-09-09 14:53:06 +05:30
example-hosts.ini Move remote host setup to root README 2024-09-09 14:53:06 +05:30
README.md Move remote host setup to root README 2024-09-09 14:53:06 +05:30

testnet-ops

Installation

  • Install Ansible

  • 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

Setup Remote Hosts

To run the playbook on a remote machine, setup the required ansible inventory:

  • Create a new hosts.ini file:

    cp example-hosts.ini hosts.ini
    
  • Edit the hosts.ini file to run the playbook on a remote machine:

    [<deployment_host>]
    <host_name> ansible_host=<target_ip> ansible_user=<ssh_user> ansible_ssh_common_args='-o ForwardAgent=yes'
    
    • Replace <deployment_host> with the appropriate host group for the deployment
    • Replace <host_name> with the alias of your choice
    • Replace <target_ip> with the IP address or hostname of the target machine
    • Replace <ssh_user> with the SSH username (e.g., dev, ubuntu)
  • Verify that you are able to connect to the host using the following command

    ansible all -m ping -i hosts.ini -k
    
    # Expected output:
    
    # <host_name> | SUCCESS => {
    #  "ansible_facts": {
    #      "discovered_interpreter_python": "/usr/bin/python3.10"
    #  },
    #  "changed": false,
    #  "ping": "pong"
    # }
    

Playbooks