ansible / ansible.builtin / v2.8.18 / module / ce_bgp Manages BGP configuration on HUAWEI CloudEngine switches. | "added in version" 2.4 of ansible.builtin" Authors: wangdezhuang (@QijunPan) preview | supported by communityansible.builtin.ce_bgp (v2.8.18) — module
pip
Install with pip install ansible==2.8.18
Manages BGP configurations on HUAWEI CloudEngine switches.
- name: CloudEngine BGP 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: "Enable BGP" ce_bgp: state: present as_number: 100 confed_id_number: 250 provider: "{{ cli }}" - name: "Disable BGP" ce_bgp: state: absent as_number: 100 confed_id_number: 250 provider: "{{ cli }}" - name: "Create confederation peer AS num" ce_bgp: state: present confed_peer_as_num: 260 provider: "{{ cli }}"
state: choices: - present - absent default: present description: - Specify desired state of the resource. vrf_name: description: - Name of a BGP instance. The name is a case-sensitive string of characters. as_number: description: - Local AS number. The value is a string of 1 to 11 characters. hold_time: description: - Hold time, in seconds. The value of the hold time can be 0 or range from 3 to 65535. router_id: description: - ID of a router that is in IPv4 address format. is_shutdown: choices: - no_use - 'true' - 'false' default: no_use description: - Interrupt BGP all neighbor. memory_limit: choices: - no_use - 'true' - 'false' default: no_use description: - Support BGP RIB memory protection. as_path_limit: description: - Maximum number of AS numbers in the AS_Path attribute. The default value is 255. gr_peer_reset: choices: - no_use - 'true' - 'false' default: no_use description: - Peer disconnection through GR. hold_interval: description: - Hold interval. min_hold_time: description: - Min hold time, in seconds. The value of the hold time can be 0 or range from 20 to 65535. check_first_as: choices: - no_use - 'true' - 'false' default: no_use description: - Check the first AS in the AS_Path of the update messages from EBGP peers. clear_interval: description: - Clear interval. keepalive_time: description: - If the value of a timer changes, the BGP peer relationship between the routers is disconnected. The value is an integer ranging from 0 to 21845. The default value is 60. conn_retry_time: description: - ConnectRetry interval. The value is an integer, in seconds. The default value is 32s. default_af_type: choices: - ipv4uni - ipv6uni description: - Type of a created address family, which can be IPv4 unicast or IPv6 unicast. The default type is IPv4 unicast. keep_all_routes: choices: - no_use - 'true' - 'false' default: no_use description: - If the value is true, the system stores all route update messages received from all peers (groups) after BGP connection setup. If the value is false, the system stores only BGP update messages that are received from peers and pass the configured import policy. bgp_rid_auto_sel: choices: - no_use - 'true' - 'false' default: no_use description: - The function to automatically select router IDs for all VPN BGP instances is enabled. confed_id_number: description: - Confederation ID. The value is a string of 1 to 11 characters. graceful_restart: choices: - no_use - 'true' - 'false' default: no_use description: - Enable GR of the BGP speaker in the specified address family, peer address, or peer group. 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. confed_nonstanded: choices: - no_use - 'true' - 'false' default: no_use description: - Configure the device to be compatible with devices in a nonstandard confederation. 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. suppress_interval: description: - Suppress interval. time_wait_for_rib: description: - Period of waiting for the End-Of-RIB flag. The value is an integer ranging from 3 to 3000. The default value is 600. confed_peer_as_num: description: - Confederation AS number, in two-byte or four-byte format. The value is a string of 1 to 11 characters.
changed: description: check to see if a change was made on the device returned: always sample: true type: bool end_state: description: k/v pairs of aaa params after module execution returned: always sample: bgp_enable: - - '100' - - 'true' type: dict existing: description: k/v pairs of existing aaa server returned: always sample: bgp_enable: - - '100' - - 'true' type: dict proposed: description: k/v pairs of parameters passed into module returned: always sample: as_number: '100' state": present type: dict updates: description: command sent to the device returned: always sample: - bgp 100 type: list