File tree Expand file tree Collapse file tree 1 file changed +30
-8
lines changed Expand file tree Collapse file tree 1 file changed +30
-8
lines changed Original file line number Diff line number Diff line change 77    - Juniper.junos 
88
99  tasks :
10- # #################################################
11- # ###    TEST 1                                  ##
12- # #################################################
10+ # ################
1311    - name : " Execute single RPC get-software-information without any kwargs" 
1412      juniper_junos_rpc :
1513        host : " {{ ansible_ssh_host }}" 
2826          - test1|succeeded 
2927      tags : [ test1 ] 
3028
31- # #################################################
32- # ###    TEST 2                                  ##
33- # #################################################
29+ # ################
3430    - name : " Get Device Configuration with dest" 
3531      juniper_junos_rpc :
3632        host : " {{ ansible_ssh_host }}" 
5652      tags : [ test2 ] 
5753
5854    - name : Clean up TEST 2 
55+       file :
56+         path : get_config.conf 
57+         state : absent 
5958
6059
6160# ################
159158          - stat_result_1.stat.exists == True 
160159      tags : [ test6 ] 
161160
162- # ################
161+     - name : Clean up TEST 6 
162+       file :
163+         path : get_config.conf 
164+         state : absent 
163165
166+ # ################
164167    - name : Get Device Configuration for interface 
165168      juniper_junos_rpc :
166169        host : " {{ ansible_ssh_host }}" 
179182          - test7|succeeded 
180183      tags : [ test7 ] 
181184
182- # ################
185+ # ################
186+     - name : " Execute wrong RPC to generate RPC error" 
187+       juniper_junos_rpc :
188+         host : " {{ ansible_ssh_host }}" 
189+         port : " {{ ansible_ssh_port }}" 
190+         user : " {{ ansible_ssh_user }}" 
191+         passwd : " {{ ansible_ssh_pass }}" 
192+         rpcs :
193+           - " wrong-rpc" 
194+       register : test8 
195+       ignore_errors : True 
196+       tags : [ test5 ] 
197+ 
198+     - name : Check TEST 8 
199+       assert :
200+         that :
201+           - test8|failed 
202+       tags : [ test8 ] 
203+ 
204+ # ################
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments