ovirt: default save true in setup host networks (#49983)
* ovirt: default save true in setup host networks Default value for save updated network configuration during setup host networks is set to true. * ovirt: default save true in setup host networks Default value for save updated network configuration during setup host networks is set to true. * ovirt: default save true in setup host networks Default value for save updated network configuration during setup host networks is set to true. * Update ovirt_host_network.py * ovirt: default save true in setup host networks Default value for save updated network configuration during setup host networks is set to true. * ovirt: default save true in setup host networks Default value for save updated network configuration during setup host networks is set to true.
This commit is contained in:
parent
f4253459d6
commit
1b48e47717
1 changed files with 10 additions and 7 deletions
|
@ -74,8 +74,9 @@ options:
|
||||||
type: bool
|
type: bool
|
||||||
save:
|
save:
|
||||||
description:
|
description:
|
||||||
- "If I(true) network configuration will be persistent, by default they are temporarily."
|
- "If I(true) network configuration will be persistent, otherwise it is temporary. Default I(true) since Ansible 2.8."
|
||||||
type: bool
|
type: bool
|
||||||
|
default: True
|
||||||
sync_networks:
|
sync_networks:
|
||||||
description:
|
description:
|
||||||
- "If I(true) all networks will be synchronized before modification"
|
- "If I(true) all networks will be synchronized before modification"
|
||||||
|
@ -89,6 +90,8 @@ EXAMPLES = '''
|
||||||
# Examples don't contain auth parameter for simplicity,
|
# Examples don't contain auth parameter for simplicity,
|
||||||
# look at ovirt_auth module to see how to reuse authentication:
|
# look at ovirt_auth module to see how to reuse authentication:
|
||||||
|
|
||||||
|
# In all examples the durability of the configuration created is dependent on the 'save' option value:
|
||||||
|
|
||||||
# Create bond on eth0 and eth1 interface, and put 'myvlan' network on top of it and persist the new configuration:
|
# Create bond on eth0 and eth1 interface, and put 'myvlan' network on top of it and persist the new configuration:
|
||||||
- name: Bonds
|
- name: Bonds
|
||||||
ovirt_host_network:
|
ovirt_host_network:
|
||||||
|
@ -108,7 +111,7 @@ EXAMPLES = '''
|
||||||
gateway: 1.2.3.4
|
gateway: 1.2.3.4
|
||||||
version: v4
|
version: v4
|
||||||
|
|
||||||
# Create bond on eth1 and eth2 interface, specifiyng both mode and miimon temporarily:
|
# Create bond on eth1 and eth2 interface, specifiyng both mode and miimon:
|
||||||
- name: Bonds
|
- name: Bonds
|
||||||
ovirt_host_network:
|
ovirt_host_network:
|
||||||
name: myhost
|
name: myhost
|
||||||
|
@ -121,14 +124,14 @@ EXAMPLES = '''
|
||||||
- eth1
|
- eth1
|
||||||
- eth2
|
- eth2
|
||||||
|
|
||||||
# Remove bond0 bond from host interfaces temporarily:
|
# Remove bond0 bond from host interfaces:
|
||||||
- ovirt_host_network:
|
- ovirt_host_network:
|
||||||
state: absent
|
state: absent
|
||||||
name: myhost
|
name: myhost
|
||||||
bond:
|
bond:
|
||||||
name: bond0
|
name: bond0
|
||||||
|
|
||||||
# Assign myvlan1 and myvlan2 vlans to host eth0 interface temporarily:
|
# Assign myvlan1 and myvlan2 vlans to host eth0 interface:
|
||||||
- ovirt_host_network:
|
- ovirt_host_network:
|
||||||
name: myhost
|
name: myhost
|
||||||
interface: eth0
|
interface: eth0
|
||||||
|
@ -136,7 +139,7 @@ EXAMPLES = '''
|
||||||
- name: myvlan1
|
- name: myvlan1
|
||||||
- name: myvlan2
|
- name: myvlan2
|
||||||
|
|
||||||
# Remove myvlan2 vlan from host eth0 interface temporarily:
|
# Remove myvlan2 vlan from host eth0 interface:
|
||||||
- ovirt_host_network:
|
- ovirt_host_network:
|
||||||
state: absent
|
state: absent
|
||||||
name: myhost
|
name: myhost
|
||||||
|
@ -144,7 +147,7 @@ EXAMPLES = '''
|
||||||
networks:
|
networks:
|
||||||
- name: myvlan2
|
- name: myvlan2
|
||||||
|
|
||||||
# Remove all networks/vlans from host eth0 interface temporarily:
|
# Remove all networks/vlans from host eth0 interface:
|
||||||
- ovirt_host_network:
|
- ovirt_host_network:
|
||||||
state: absent
|
state: absent
|
||||||
name: myhost
|
name: myhost
|
||||||
|
@ -348,7 +351,7 @@ def main():
|
||||||
networks=dict(default=None, type='list'),
|
networks=dict(default=None, type='list'),
|
||||||
labels=dict(default=None, type='list'),
|
labels=dict(default=None, type='list'),
|
||||||
check=dict(default=None, type='bool'),
|
check=dict(default=None, type='bool'),
|
||||||
save=dict(default=None, type='bool'),
|
save=dict(default=True, type='bool'),
|
||||||
sync_networks=dict(default=False, type='bool'),
|
sync_networks=dict(default=False, type='bool'),
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec=argument_spec)
|
module = AnsibleModule(argument_spec=argument_spec)
|
||||||
|
|
Loading…
Reference in a new issue