Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - name: A simple template with some configuration
- template:
- src: "templates/{{ os }}/simple.j2"
- dest: "{{ host_dir }}/simple.conf"
- changed_when: False
- # check_mode: no
- - name: Load configuration into the device
- ios_config:
- host: "{{ inventory_hostname }}"
- port: "{{ port }}"
- username: "{{ user }}"
- password: "{{ password }}"
- timeout: 30
- # ssh_keyfile: "/home/ansible/.ssh/id_rsa"
- backup: "yes"
- match: "line"
- replace: "line"
- # provider: "publickey"
- # multiline_delimiter: "@"
- src: "{{ host_dir }}/simple.conf"
- register: ios_config_output
- tags: [print_action]
- - debug:
- msg: "{{ host_dir }}/simple.conf"
- check_mode: no
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement