File tree Expand file tree Collapse file tree
infra/aggregation_mode/ansible/playbooks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414
1515 - name : Set config vars from INI file
1616 set_fact :
17+ grafana_admin_password : " {{ lookup('ini', 'grafana_admin_password', file=config_file) }}"
1718 grafana_prometheus_url : " {{ lookup('ini', 'grafana_prometheus_url', file=config_file) }}"
1819 grafana_rpc_url : " {{ lookup('ini', 'grafana_rpc_url', file=config_file) }}"
1920 grafana_postgres_host : " {{ lookup('ini', 'grafana_postgres_host', file=config_file) }}"
103104 vars :
104105 ansible_ssh_user : " {{ admin_user }}"
105106
107+ - name : Set Grafana admin password
108+ become : true
109+ lineinfile :
110+ path : /etc/grafana/grafana.ini
111+ regexp : ' ^;?admin_password\s*='
112+ line : ' admin_password = {{ grafana_admin_password }}'
113+ insertafter : ' ^\[security\]'
114+ vars :
115+ ansible_ssh_user : " {{ admin_user }}"
116+ no_log : true
117+
118+ - name : Copy provisioning directory
119+ become : true
120+ copy :
121+ src : ../../../../grafana/provisioning/
122+ dest : /etc/grafana/provisioning/
123+ owner : grafana
124+ group : grafana
125+ mode : ' 0644'
126+ directory_mode : ' 0755'
127+ vars :
128+ ansible_ssh_user : " {{ admin_user }}"
129+
106130 - name : Enable and start Grafana service
107131 become : true
108132 systemd_service :
Original file line number Diff line number Diff line change @@ -77,11 +77,12 @@ gateway_primary_hostname=agg-mode-hoodi-gateway-1
7777gateway_secondary_hostname =agg-mode-hoodi-gateway-2
7878
7979# Grafana Configuration
80+ grafana_admin_password =
8081grafana_prometheus_url =http://localhost:9090
8182grafana_rpc_url =https://aligned-hoodi-rpc-geth.tail665ae.ts.net
8283grafana_postgres_host =agg-mode-hoodi-postgres-1
8384grafana_postgres_port =5432
8485grafana_postgres_db =agg_mode
85- grafana_postgres_user =autoctl_node
86+ grafana_postgres_user =grafana
8687# REQUIRED: Set to same password as db_password
8788grafana_postgres_password =
Original file line number Diff line number Diff line change @@ -77,12 +77,13 @@ gateway_primary_hostname=agg-mode-mainnet-gateway-1
7777gateway_secondary_hostname =agg-mode-mainnet-gateway-2
7878
7979# Grafana Configuration
80+ grafana_admin_password =
8081grafana_prometheus_url =http://localhost:9090
8182# TODO: Update with mainnet RPC URL
8283grafana_rpc_url =https://aligned-mainnet-rpc-1.tail665ae.ts.net
8384grafana_postgres_host =agg-mode-mainnet-postgres-1
8485grafana_postgres_port =5432
8586grafana_postgres_db =agg_mode
86- grafana_postgres_user =autoctl_node
87+ grafana_postgres_user =grafana
8788# REQUIRED: Set to same password as db_password
8889grafana_postgres_password =
You can’t perform that action at this time.
0 commit comments