ansible / ansible.builtin / v2.5.11 / module / ce_bgp_af Manages BGP Address-family configuration on HUAWEI CloudEngine switches. | "added in version" 2.4 of ansible.builtin" Authors: wangdezhuang (@CloudEngine-Ansible) preview | supported by communityansible.builtin.ce_bgp_af (v2.5.11) — module
pip
Install with pip install ansible==2.5.11
Manages BGP Address-family configurations on HUAWEI CloudEngine switches.
- name: CloudEngine BGP address family test hosts: cloudengine connection: local gather_facts: no vars: cli: host: "{{ inventory_hostname }}" port: "{{ ansible_ssh_port }}" username: "{{ username }}" password: "{{ password }}" transport: cli tasks: - name: "Config BGP Address_Family" ce_bgp_af: state: present vrf_name: js af_type: ipv4uni provider: "{{ cli }}" - name: "Undo BGP Address_Family" ce_bgp_af: state: absent vrf_name: js af_type: ipv4uni provider: "{{ cli }}" - name: "Config import route" ce_bgp_af: state: present vrf_name: js af_type: ipv4uni import_protocol: ospf import_process_id: 123 provider: "{{ cli }}" - name: "Undo import route" ce_bgp_af: state: absent vrf_name: js af_type: ipv4uni import_protocol: ospf import_process_id: 123 provider: "{{ cli }}" - name: "Config network route" ce_bgp_af: state: present vrf_name: js af_type: ipv4uni network_address: 1.1.1.1 mask_len: 24 provider: "{{ cli }}" - name: "Undo network route" ce_bgp_af: state: absent vrf_name: js af_type: ipv4uni network_address: 1.1.1.1 mask_len: 24 provider: "{{ cli }}"
state: choices: - present - absent default: present description: - Specify desired state of the resource. required: false af_type: choices: - ipv4uni - ipv4multi - ipv4vpn - ipv6uni - ipv6vpn - evpn description: - Address family type of a BGP instance. required: true mask_len: default: null description: - Specify the mask length of an IP address. The value is an integer ranging from 0 to 128. required: false vrf_name: description: - Name of a BGP instance. The name is a case-sensitive string of characters. The BGP instance can be used only after the corresponding VPN instance is created. The value is a string of 1 to 31 case-sensitive characters. required: true router_id: default: null description: - ID of a router that is in IPv4 address format. The value is a string of 0 to 255 characters. The value is in dotted decimal notation. required: false default_med: default: null description: - Specify the Multi-Exit-Discriminator (MED) of BGP routes. The value is an integer ranging from 0 to 4294967295. required: false determin_med: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, BGP deterministic-MED is enabled. If the value is false, BGP deterministic-MED is disabled. required: false as_path_neglect: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, the AS path attribute is ignored when BGP selects an optimal route. If the value is false, the AS path attribute is not ignored when BGP selects an optimal route. An AS path with a smaller length has a higher priority. required: false auto_frr_enable: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, BGP auto FRR is enabled. If the value is false, BGP auto FRR is disabled. required: false import_protocol: choices: - direct - ospf - isis - static - rip - ospfv3 - ripng default: null description: - Routing protocol from which routes can be imported. required: false lowest_priority: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, enable reduce priority to advertise route. If the value is false, disable reduce priority to advertise route. required: false network_address: default: null description: - Specify the IP address advertised by BGP. The value is a string of 0 to 255 characters. required: false rib_only_enable: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, BGP routes cannot be advertised to the IP routing table. If the value is false, Routes preferred by BGP are advertised to the IP routing table. required: false route_sel_delay: default: null description: - Route selection delay. The value is an integer ranging from 0 to 3600. required: false add_path_sel_num: default: null description: - Number of Add-Path routes. The value is an integer ranging from 2 to 64. required: false allow_invalid_as: choices: - no_use - 'true' - 'false' default: no_use description: - Allow routes with BGP origin AS validation result Invalid to be selected. If the value is true, invalid routes can participate in route selection. If the value is false, invalid routes cannot participate in route selection. required: false originator_prior: choices: - no_use - 'true' - 'false' default: no_use description: - Originator prior. required: false preference_local: default: null description: - Set the protocol priority of a local BGP route. The value is an integer ranging from 1 to 255. required: false reflect_chg_path: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, the route reflector is enabled to modify route path attributes based on an export policy. If the value is false, the route reflector is disabled from modifying route path attributes based on an export policy. required: false rr_filter_number: default: null description: - Set the number of the extended community filter supported by an RR group. The value is a string of 1 to 51 characters. required: false supernet_uni_adv: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, the function to advertise supernetwork unicast routes is enabled. If the value is false, the function to advertise supernetwork unicast routes is disabled. required: false vrf_rid_auto_sel: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, VPN BGP instances are enabled to automatically select router IDs. If the value is false, VPN BGP instances are disabled from automatically selecting router IDs. required: false ebgp_if_sensitive: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, after the fast EBGP interface awareness function is enabled, EBGP sessions on an interface are deleted immediately when the interface goes Down. If the value is false, after the fast EBGP interface awareness function is enabled, EBGP sessions on an interface are not deleted immediately when the interface goes Down. required: false igp_metric_ignore: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, the metrics of next-hop IGP routes are not compared when BGP selects an optimal route. If the value is false, the metrics of next-hop IGP routes are not compared when BGP selects an optimal route. A route with a smaller metric has a higher priority. required: false import_process_id: default: null description: - Process ID of an imported routing protocol. The value is an integer ranging from 0 to 4294967295. required: false max_load_ebgp_num: default: null description: - Specify the maximum number of equal-cost EBGP routes. The value is an integer ranging from 1 to 65535. required: false max_load_ibgp_num: default: null description: - Specify the maximum number of equal-cost IBGP routes. The value is an integer ranging from 1 to 65535. required: false policy_vpn_target: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, VPN-Target filtering function is performed for received VPN routes. If the value is false, VPN-Target filtering function is not performed for received VPN routes. required: false router_id_neglect: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, the router ID attribute is ignored when BGP selects the optimal route. If the value is false, the router ID attribute is not ignored when BGP selects the optimal route. required: false summary_automatic: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, automatic aggregation is enabled for locally imported routes. If the value is false, automatic aggregation is disabled for locally imported routes. required: false always_compare_med: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, the MEDs of routes learned from peers in different autonomous systems are compared when BGP selects an optimal route. If the value is false, the MEDs of routes learned from peers in different autonomous systems are not compared when BGP selects an optimal route. required: false default_local_pref: default: null description: - Set the Local-Preference attribute. The value is an integer. The value is an integer ranging from 0 to 4294967295. required: false relay_delay_enable: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, relay delay enable. If the value is false, relay delay disable. required: false supernet_label_adv: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, the function to advertise supernetwork label is enabled. If the value is false, the function to advertise supernetwork label is disabled. required: false med_none_as_maximum: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, when BGP selects an optimal route, the system uses 4294967295 as the MED value of a route if the route's attribute does not carry a MED value. If the value is false, the system uses 0 as the MED value of a route if the route's attribute does not carry a MED value. required: false nexthop_third_party: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, the third-party next hop function is enabled. If the value is false, the third-party next hop function is disabled. required: false preference_external: default: null description: - Set the protocol priority of EBGP routes. The value is an integer ranging from 1 to 255. required: false preference_internal: default: null description: - Set the protocol priority of IBGP routes. The value is an integer ranging from 1 to 255. required: false ecmp_nexthop_changed: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, the next hop of an advertised route is changed to the advertiser itself in BGP load-balancing scenarios. If the value is false, the next hop of an advertised route is not changed to the advertiser itself in BGP load-balancing scenarios. required: false maximum_load_balance: default: null description: - Specify the maximum number of equal-cost routes in the BGP routing table. The value is an integer ranging from 1 to 65535. required: false reflector_cluster_id: default: null description: - Set a cluster ID. Configuring multiple RRs in a cluster can enhance the stability of the network. The value is an integer ranging from 1 to 4294967295. required: false rib_only_policy_name: default: null description: - Specify the name of a routing policy. The value is a string of 1 to 40 characters. required: false prefrence_policy_name: default: null description: - Set a routing policy to filter routes so that a configured priority is applied to the routes that match the specified policy. The value is a string of 1 to 40 characters. required: false active_route_advertise: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, BGP is enabled to advertise only optimal routes in the RM to peers. If the value is false, BGP is not enabled to advertise only optimal routes in the RM to peers. required: false policy_ext_comm_enable: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, modifying extended community attributes is allowed. If the value is false, modifying extended community attributes is not allowed. required: false reflect_between_client: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, route reflection is enabled between clients. If the value is false, route reflection is disabled between clients. required: false reflector_cluster_ipv4: default: null description: - Set a cluster ipv4 address. The value is expressed in the format of an IPv4 address. required: false ingress_lsp_policy_name: default: null description: - Ingress lsp policy name. required: false default_rt_import_enable: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, importing default routes to the BGP routing table is allowed. If the value is false, importing default routes to the BGP routing table is not allowed. required: false next_hop_sel_depend_type: choices: - default - dependTunnel - dependIp default: default description: - Next hop select depend type. required: false ebgp_ecmp_nexthop_changed: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, the next hop of an advertised route is changed to the advertiser itself in EBGP load-balancing scenarios. If the value is false, the next hop of an advertised route is not changed to the advertiser itself in EBGP load-balancing scenarios. required: false ibgp_ecmp_nexthop_changed: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, the next hop of an advertised route is changed to the advertiser itself in IBGP load-balancing scenarios. If the value is false, the next hop of an advertised route is not changed to the advertiser itself in IBGP load-balancing scenarios. required: false nhp_relay_route_policy_name: default: null description: - Specify the name of a route-policy for route iteration. The value is a string of 1 to 40 characters. required: false load_balancing_as_path_ignore: choices: - no_use - 'true' - 'false' default: no_use description: - Load balancing as path ignore. required: false
changed: description: check to see if a change was made on the device returned: always sample: true type: boolean end_state: description: k/v pairs of aaa params after module execution returned: always sample: af_type: ipv4uni vrf_name: js type: dict existing: description: k/v pairs of existing aaa server returned: always sample: {} type: dict proposed: description: k/v pairs of parameters passed into module returned: always sample: af_type: ipv4uni state: present vrf_name: js type: dict updates: description: command sent to the device returned: always sample: - ipv4-family vpn-instance js type: list