Execution
Date 14 Apr 2025 14:58:24 +0100
Duration 00:00:01.46
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.11
ara 1.7.2 / 1.7.2
Python 3.10.10
Summary
2 Hosts
3 Tasks
6 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/kuly/RM10003-remove-flows.yaml

---
- name: Playbook to add rules and verify them
  hosts: all
  gather_facts: false
  tasks:
    - name: Run the command
      ansible.builtin.shell: |
        set -o pipefail
        ovs-ofctl del-flows br-int "table=3 cookie=0xffffffffffffffff/-1"
        ovs-ofctl del-flows br-int "table=5 cookie=0xffffffffffffffff/-1"
        ovs-ofctl dump-flows br-int | grep cookie=0xffffffffffffffff | egrep "table=3|table=5"
      args:
        executable: /bin/bash
      register: result
      changed_when: false
      failed_when: result.rc == 0
    - name: Print successful output
      when: result.rc != 0
      ansible.builtin.debug:
        var: result.stdout
    - name: Debug the result
      when: result.rc == 0
      ansible.builtin.debug:
        msg: "OVS Flows Verification Failed. Flows found in place."