<commit_before>---

- name: generate bridge interfaces for testing ip addresses
  mt_interfaces:
    hostname: "{{ mt_hostname }}"
    username: "{{ mt_user }}"
    password: "{{ <PASSWORD> }}"
    state:    present
    parameter: bridge
    settings:
      name:     "{{ item }}"
      arp:      proxy-arp
  with_items:
    - "bridge1"
    - "bridge2"
    - "bridge3"
    - "bridge4"

- name: ALWAYS_CHANGES Test adding an ip addr bridge2
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ <PASSWORD> }}"
    state:      "present"
    settings:
      interface:  "bridge2"
      address:    "192.168.88.2/24"
      network:    "192.168.88.0"
  register: ip_addr_add_2
  failed_when: not ( ip_addr_add_2 | changed )

- name: NEVER_CHANGES Test adding the same ip addr again to bridge2
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ <PASSWORD> }}"
    state:      "present"
    settings:
      interface:  "bridge2"
      address:    "192.168.88.2/24"
      network:    "192.168.88.0"
  register: ip_addr_add_2
  failed_when: ip_addr_add_2 | changed

- name: Test adding an ip addr with comment bridge3
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ mt_<PASSWORD> }}"
    state:      "present"
    settings:
      interface:  "bridge3"
      address:    "192.168.88.3/24"
      comment:    "bridge #3!!!"

- name: Test adding an ip addr with comment and network bridge4
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ mt_pass }}"
    state:      "present"
    settings:
      interface:  "bridge4"
      address:    "192.168.88.4/24"
      network:    "192.168.88.0"
      comment:    "bridge4 first addition"

- name: Test adding a second ip addr with comment and network bridge4
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ <PASSWORD> }}"
    state:      "present"
    settings:
      interface:  "bridge4"
      address:    "192.168.88.5/24"
      network:    "192.168.88.0"
      comment:    "bridge #4 second addition"

- name: ALWAYS_CHANGES Test removing ip addr bridge2
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ <PASSWORD> }}"
    state:      "absent"
    settings:
      interface:  "bridge2"
      address:    "192.168.88.2/24"
  register: ip_addr_rem_2
  failed_when: not ( ip_addr_rem_2 | changed )

- name: NEVER_CHANGES Test removing ip addr bridge2 again
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ <PASSWORD> }}"
    state:      "absent"
    settings:
      interface:  "bridge2"
      address:    "192.168.88.2/24"
  register: ip_addr_rem_2
  failed_when: ip_addr_rem_2 | changed

- name: ALWAYS_CHANGES Test removing an ip addr from bridge4
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ <PASSWORD> }}"
    state:      "absent"
    settings:
      interface:  "bridge4"
      address:    "192.168.88.4/24"
  register: ip_addr_rem_4
  failed_when: not (ip_addr_rem_4 | changed )
<commit_msg>Improved testing adding some verification tasks<commit_after>---

- name: generate bridge interfaces for testing ip addresses
  mt_interfaces:
    hostname: "{{ mt_hostname }}"
    username: "{{ mt_user }}"
    password: "{{ <PASSWORD> }}"
    state:    present
    parameter: bridge
    settings:
      name:     "{{ item }}"
      arp:      proxy-arp
  with_items:
    - "bridge1"
    - "bridge2"
    - "bridge3"
    - "bridge4"

- name: ALWAYS_CHANGES Test adding an ip addr bridge2
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ <PASSWORD> }}"
    state:      "present"
    settings:
      interface:  "bridge2"
      address:    "192.168.88.2/24"
      network:    "192.168.88.0"
  register: ip_addr_add_2
  failed_when: not ( ip_addr_add_2 | changed )

- name: NEVER_CHANGES Test adding the same ip addr again to bridge2
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ <PASSWORD> }}"
    state:      "present"
    settings:
      interface:  "bridge2"
      address:    "192.168.88.2/24"
      network:    "192.168.88.0"
  register: ip_addr_add_2
  failed_when: ip_addr_add_2 | changed

- name: Test adding an ip addr with comment bridge3
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ <PASSWORD> }}"
    state:      "present"
    settings:
      interface:  "bridge3"
      address:    "192.168.88.3/24"
      comment:    "bridge #3!!!"

- name: Test adding an ip addr with comment and network bridge4
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ <PASSWORD> }}"
    state:      "present"
    settings:
      interface:  "bridge4"
      address:    "192.168.88.4/24"
      network:    "192.168.88.0"
      comment:    "bridge4 first addition"

- name: Test adding a second ip addr with comment and network bridge4
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ mt_<PASSWORD> }}"
    state:      "present"
    settings:
      interface:  "bridge4"
      address:    "192.168.88.5/24"
      network:    "192.168.88.0"
      comment:    "bridge #4 second addition"

- name: ALWAYS_CHANGES Test removing ip addr bridge2
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ <PASSWORD> }}"
    state:      "absent"
    settings:
      interface:  "bridge2"
      address:    "192.168.88.2/24"
  register: ip_addr_rem_2
  failed_when: not ( ip_addr_rem_2 | changed )

- name: NEVER_CHANGES Test removing ip addr bridge2 again
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ <PASSWORD> }}"
    state:      "absent"
    settings:
      interface:  "bridge2"
      address:    "192.168.88.2/24"
  register: ip_addr_rem_2
  failed_when: ip_addr_rem_2 | changed

- name: ALWAYS_CHANGES Test removing an ip addr from bridge4
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ mt_<PASSWORD> }}"
    state:      "absent"
    settings:
      interface:  "bridge4"
      address:    "192.168.88.4/24"
  register: ip_addr_rem_4
  failed_when: not (ip_addr_rem_4 | changed )

- name: NEVER_CHANGES Verify ip addr from bridge4 has been removed
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ <PASSWORD> }}"
    state:      "absent"
    settings:
      interface:  "bridge4"
      address:    "192.168.88.4/24"
  register: ip_addr_rem_4
  failed_when: ip_addr_rem_4 | changed

- name: NEVER_CHANGES Verify that we have the right ip address in bridge4
  mt_ip_address:
    hostname:   "{{ mt_hostname }}"
    username:   "{{ mt_user }}"
    password:   "{{ <PASSWORD> }}"
    state:      "present"
    settings:
      interface:  "bridge4"
      address:    "192.168.88.5/24"
  register: ip_addr_rem_4
  failed_when: ip_addr_rem_4 | changed 


{'fraction_non_alphanumeric': 0.13070823079026525, 'fraction_numerical': 0.04703308722996992, 'mean_word_length': 2.4569943289224954, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 26, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6335066', 'n_tokens_mistral': 2768, 'n_tokens_neox': 2622, 'n_words': 595}