Initializing the network snapshot with Ansible
To allow Batfish to analyze the network using the devices’ configuration files, these files need to be structured in a specific folder, as mentioned in the previous section. In this recipe, you will pass the configuration files to Batfish and initialize your first Batfish snapshot.
Let’s get started by creating the playbook to initialize the snapshot.
- Create a new playbook named
pb_generate_snapshot.ymland add the following tasks to connect to Batfish and initialize the network snapshot.root@cookbook-lab:~/cookbook-lab/chapters/ch11# vi pb_generate_snapshot.yml --- - name: "CREATE SESSION AND INITIALIZE SNAPSHOT" gather_facts: false hosts: "localhost" roles: - batfish.base (1) tasks: - name: "SETUP CONNECTION TO BATFISH SERVICE" bf_session...