this is my main playbook i can successfully create the file in the "ospf" directory.
now all i need to do is push the configurations to a network device?
spine.j2 file..............................
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
configure terminal
!
hostname {{ item.hostname }}
!
interface fastethernet0/12
{{ item.switchport }}
!
name: Template hosts: "switches" gather_facts: false connection: local remote_user: root
tasks:
name: generate Config template: src=./config_templates/spine.j2 dest=./ospf/{{ item.hostname }}.txt notify:
with_items:
name: TEST IOS_TEMPLATE ios_template: src: spine.j2 host: "{{ ansible_host }}" username: "{{ ansible_user }}" password: "{{ ansible_password }}" include_defaults: true config:
this is my main playbook i can successfully create the file in the "ospf" directory.
now all i need to do is push the configurations to a network device? spine.j2 file.............................. ! version 12.2 no service pad service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! configure terminal ! hostname {{ item.hostname }} ! interface fastethernet0/12 {{ item.switchport }} !
please help i am new to Ansible