Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. ---
  2.  
  3. - name: Change add communti to set community
  4.  
  5. remote_user: me
  6.  
  7. ask-pass: yes
  8.  
  9. hosts: all
  10.  
  11. gather_facts: no
  12.  
  13.  
  14.  
  15. tasks:
  16.  
  17. - name: Get configuration with community add
  18.  
  19. junos_cli:
  20.  
  21. cli: "show configuration policy | match "community add" | disp set"
  22.  
  23. dest: ~/Downloads/ansible/configuration_tb.txt
  24.  
  25.  
  26.  
  27. - name: Replace configuration add community to set community
  28.  
  29. replace:
  30.  
  31. path: ~/Downloads/ansible/configuration_tb.txt
  32.  
  33. regexp: 'add'
  34.  
  35. replace: "set"
  36.  
  37.  
  38.  
  39. - name: Install configuration file onto device
  40.  
  41. juniper_junos_config:
  42.  
  43. load: merge
  44.  
  45. src: "~/Downloads/ansible/configuration_tb.txt"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement