File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed 
playbooks/roles/etc-hosts/tasks Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ ${bastion_name} ansible_host=${bastion_ip} ansible_user=${bastion_username} role
55${ host}   ansible_host=${ ip}   ansible_user=${ compute_username}   role=compute
66%{  endfor ~} 
77[nfs]
8+ %{  if  nfs !=  " "   } 
89${ nfs}   ansible_user=${ compute_username}   role=nfs
10+ %{  endif } 
911[all:children]
1012bastion
1113compute
Original file line number Diff line number Diff line change 3030    marker : " # {mark} ANSIBLE MANAGED BLOCK {{ cluster_name }}" 
3131  delegate_to : 127.0.0.1 
3232  run_once : true 
33-   when : not destroy|bool 
33+   when : not destroy|bool and groups['compute']|length > 0  
3434
3535- name : add cluster nodes to the /etc/hosts file of the bastion 
3636  blockinfile :
4141    marker : " # {mark} ANSIBLE MANAGED BLOCK {{ cluster_name }}" 
4242  delegate_to : 127.0.0.1 
4343  run_once : true 
44-   when : not destroy|bool 
44+   when : not destroy|bool and groups['compute']|length > 0  
4545
4646- name : move /etc/hosts on all compute nodes 
4747  become : true 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments