user45  
                
                  
                    June 15, 2017,  5:31am
                   
                  1 
               
             
            
              tasks:
name: Variablemodule: “ios_command”  
 
############### Working ############
name: Cisco ios commandios_command:  
 
############## Not Working ###########
name: Cisco ios command“{{module}}”: < – This occur error message.  
 
I want to make dynamic yml file like above, But This is not working.
If you were me, How could you do that?
             
            
              
            
           
          
            
            
              You could perhaps use template to generate the playbook file that you want to use, then run the generated playbook.
I don’t know what alternative value for module might be, but you could perhaps use when: condition to only run ios_command if some condition is true. Something like this (not tested):
ios_command: 
name: Non cisco ios command 
 
a_different_command: 
Hope this helps.
Jon
             
            
              
            
           
          
            
            
              I believe this is what you want:
- name: Cisco ios command
             
            
              
            
           
          
            
              
                user45  
              
                  
                    June 16, 2017, 12:18am
                   
                  4 
               
             
            
              Thank you ! Brian Coca !
2017년 6월 16일 금요일 오전 12시 40분 58초 UTC+9, Brian Coca 님의 말: