A network is a basic building block of the infrastructure. Most of the cloud providers will supply a sample or default network. While setting up a self-hosted OpenStack instance, a single network is typically created automatically. However, if the network is not created, or if we want to create another network for the purpose of isolation or compliance, we can do so using the os_network module.
Managing network resources
How to do it...
- Let's go ahead and create an isolated network and name it private, as follows:
- name: creating a private network
os_network:
state: present
name: private
- In the preceding example, we created a logical network with no subnets. A network with no subnets is of little use, so the...