forked from NationTech/harmony
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			625 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			625 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
# You first need to do a few things on opnsense web interface:
 | 
						|
# - enable ssh
 | 
						|
# - create a nationtech user (member of admin) with an API key (system / access /users)
 | 
						|
# - get an API key
 | 
						|
# zJhbadKcWsdY2HM47s1yLp5givIiTln0nf5CTw81igYxvFnvq8n67Ba5/MaLMSZ4EP13wphZTfHh0Nz8	
 | 
						|
 | 
						|
API_KEY="zJhbadKcWsdY2HM47s1yLp5givIiTln0nf5CTw81igYxvFnvq8n67Ba5/MaLMSZ4EP13wphZTfHh0Nz8"
 | 
						|
 | 
						|
#ansible-galaxy collection install ansible.posix
 | 
						|
ansible-galaxy collection install ansibleguy.opnsense
 | 
						|
 | 
						|
ansible-playbook network-boot.yml -i 192.168.1.1, \
 | 
						|
  -e opnsense_url="https://192.168.1.1/api" \
 | 
						|
  -e api_key="${API_KEY}" \
 | 
						|
  --connection=ssh
 | 
						|
 |