Merge 0c739d4e24 into 44ac151512
				
					
				
			This commit is contained in:
		
						commit
						17d3ba438e
					
				
					 2 changed files with 18 additions and 1 deletions
				
			
		| 
						 | 
					@ -2,3 +2,8 @@ ansible_user: CHANGEME
 | 
				
			||||||
nomad_datacenter_name: "aperture"
 | 
					nomad_datacenter_name: "aperture"
 | 
				
			||||||
nomad_server_bootstrap_expect: 3
 | 
					nomad_server_bootstrap_expect: 3
 | 
				
			||||||
consul_generated_encrypt_key: CHANGEME
 | 
					consul_generated_encrypt_key: CHANGEME
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					nomad_jobs:
 | 
				
			||||||
 | 
					- traefik
 | 
				
			||||||
 | 
					- dcufm
 | 
				
			||||||
 | 
					- user-vms/distro
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										12
									
								
								ansible/roles/run-nomad/tasks/main.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								ansible/roles/run-nomad/tasks/main.yaml
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,12 @@
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# TODO: Add Nomad namespaces. 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- name: Run {{ item }} Nomad Job
 | 
				
			||||||
 | 
					  community.general.nomad_job:
 | 
				
			||||||
 | 
					    host: "{{ lookup('ansible.builtin.env', 'NOMAD_ADDR')}}"
 | 
				
			||||||
 | 
					    token: "{{ lookup('ansible.builtin.env', 'NOMAD_TOKEN')}}"
 | 
				
			||||||
 | 
					    state: present
 | 
				
			||||||
 | 
					    content: "{{ lookup('file', '../jobs/' - task - ''.hcl') }}"
 | 
				
			||||||
 | 
					  with_items:
 | 
				
			||||||
 | 
					  - "{{ groups['nomad_jobs']}}"
 | 
				
			||||||
		Loading…
	
		Reference in a new issue