<commit_before>---
- name: "Create junction [inst_name: {{ item.0.inst_name }}, junction_point: {{ item.1.junction_point }}]"
  isam:
    appliance: "{{ inventory_hostname }}"
    adminProxyProtocol: "{{ adminProxyProtocol | default(omit) }}"
    adminProxyHostname: "{{ adminProxyHostname | default(omit) }}"
    adminProxyPort: "{{ adminProxyPort | default(omit) }}"
    adminProxyApplianceShortName: "{{ adminProxyApplianceShortName | default(omit) }}"
    omitAdminProxy: "{{ omitAdminProxy | default(omit) }}"
    username:  "{{ username }}"
    password:  "{{ password }}"
    lmi_port:  "{{ port | default(omit) }}"
    log:       "{{ log_level | default(omit) }}"
    force:     "{{ force | default(omit) }}"
    action: ibmsecurity.isam.web.reverse_proxy.junctions.add
    isamapi: "{{ item.1 | exclude('servers') | combine({'reverseproxy_id':item.0.inst_name,'server_hostname':item.1.servers[0].server_hostname,'server_port':item.1.servers[0].server_port}) }}"

- name: Add junction servers
  isam:
    appliance: "{{ inventory_hostname }}"
    adminProxyProtocol: "{{ adminProxyProtocol | default(omit) }}"
    adminProxyHostname: "{{ adminProxyHostname | default(omit) }}"
    adminProxyPort: "{{ adminProxyPort | default(omit) }}"
    adminProxyApplianceShortName: "{{ adminProxyApplianceShortName | default(omit) }}"
    omitAdminProxy: "{{ omitAdminProxy | default(omit) }}"
    username:  "{{ username }}"
    password:  "{{ password }}"
    lmi_port:  "{{ port | default(omit) }}"
    log:       "{{ log_level | default(omit) }}"
    force:     "{{ force | default(omit) }}"
    action: ibmsecurity.isam.web.reverse_proxy.junctions_server.add
    isamapi: "{{ server | combine({'reverseproxy_id':item.0.inst_name,'junction_point': item.1.junction_point,'junction_type': item.1.junction_type}) }}"
  when: not force
  with_items: "{{ item.1.servers }}"
  loop_control:
    loop_var: server
    label: "inst_name:[{{ item.0.inst_name }}], junction_point:[{{ item.1.junction_point }}], server_hostname:[{{ server.server_hostname }}], server_port:[{{ server.server_port }}]]"
<commit_msg>+1 feature: check_mode and junction creation checks all servers<commit_after>---
- name: "Create junction [inst_name: {{ item.0.inst_name }}, junction_point: {{ item.1.junction_point }}]"
  isam:
    appliance: "{{ inventory_hostname }}"
    adminProxyProtocol: "{{ adminProxyProtocol | default(omit) }}"
    adminProxyHostname: "{{ adminProxyHostname | default(omit) }}"
    adminProxyPort: "{{ adminProxyPort | default(omit) }}"
    adminProxyApplianceShortName: "{{ adminProxyApplianceShortName | default(omit) }}"
    omitAdminProxy: "{{ omitAdminProxy | default(omit) }}"
    username:  "{{ username }}"
    password:  "{{ password }}"
    lmi_port:  "{{ port | default(omit) }}"
    log:       "{{ log_level | default(omit) }}"
    force:     "{{ force | default(omit) }}"
    action: ibmsecurity.isam.web.reverse_proxy.junctions.set
    isamapi: "{{ item.1 | exclude('servers') | combine(item.1.servers[0]) | combine({'reverseproxy_id':item.0.inst_name}) }}"
  register: ret_obj
 
- name: Add junction servers
  isam:
    appliance: "{{ inventory_hostname }}"
    adminProxyProtocol: "{{ adminProxyProtocol | default(omit) }}"
    adminProxyHostname: "{{ adminProxyHostname | default(omit) }}"
    adminProxyPort: "{{ adminProxyPort | default(omit) }}"
    adminProxyApplianceShortName: "{{ adminProxyApplianceShortName | default(omit) }}"
    omitAdminProxy: "{{ omitAdminProxy | default(omit) }}"
    username:  "{{ username }}"
    password:  "{{ password }}"
    lmi_port:  "{{ port | default(omit) }}"
    log:       "{{ log_level | default(omit) }}"
    force:     "{{ force | default(omit) }}"
    action: ibmsecurity.isam.web.reverse_proxy.junctions_server.add
    isamapi: "{{ server | combine({'reverseproxy_id':item.0.inst_name,'junction_point': item.1.junction_point,'junction_type': item.1.junction_type}) }}"
  when: ((ret_obj.changed != true and ansible_check_mode) or not ansible_check_mode) and not (server.server_hostname == item.1.servers[0].server_hostname and force)
  with_items: "{{ item.1.servers }}"
  loop_control:
    loop_var: server
    label: "inst_name:[{{ item.0.inst_name }}], junction_point:[{{ item.1.junction_point }}], server_hostname:[{{ server.server_hostname }}], server_port:[{{ server.server_port }}]]"

{'fraction_non_alphanumeric': 0.1711463358603262, 'fraction_numerical': 0.006662072134160349, 'mean_word_length': 4.596401028277635, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '1566862', 'n_tokens_mistral': 1487, 'n_tokens_neox': 1422, 'n_words': 230}