# Required Python packages:
#
# ansible
# openstackclient
# openstacksdk
# netaddr
- import_playbook: common.yaml
- hosts: all
gather_facts: no
tasks:
- name: 'Create the bootstrap server port'
os_port:
name: "{{ os_port_bootstrap }}"
network: "{{ os_network }}"
security_groups:
- "{{ os_sg_master }}"
allowed_address_pairs:
- ip_address: "{{ os_subnet_range | next_nth_usable(5) }}"
- ip_address: "{{ os_subnet_range | next_nth_usable(6) }}"
- name: 'Set bootstrap port tag'
command:
cmd: "openstack port set --tag {{ cluster_id_tag }} {{ os_port_bootstrap }}"
- name: 'Create the bootstrap server'
os_server:
name: "{{ os_bootstrap_server_name }}"
image: "{{ os_image_rhcos }}"
flavor: "{{ os_flavor_master }}"
userdata: "{{ lookup('file', os_bootstrap_ignition) | string }}"
auto_ip: no
nics:
- port-name: "{{ os_port_bootstrap }}"
- name: 'Create the bootstrap floating IP'
os_floating_ip:
state: present
network: "{{ os_external_network }}"
server: "{{ os_bootstrap_server_name }}"
- import_playbook : common.yaml
- hosts : all
gather_facts : no
tasks :
- name : 'Create the bootstrap server port'
os_port :
name : "{{ os_port_bootstrap }}"
network : "{{ os_network }}"
security_groups :
- "{{ os_sg_master }}"
allowed_address_pairs :
- ip_address : "{{ os_subnet_range | next_nth_usable(5) }}"
- ip_address : "{{ os_subnet_range | next_nth_usable(6) }}"
- name : 'Set bootstrap port tag'
command :
cmd : "openstack port set --tag {{ cluster_id_tag }} {{ os_port_bootstrap }}"
- name : 'Create the bootstrap server'
os_server :
name : "{{ os_bootstrap_server_name }}"
image : "{{ os_image_rhcos }}"
flavor : "{{ os_flavor_master }}"
userdata : "{{ lookup('file', os_bootstrap_ignition) | string }}"
auto_ip : no
nics :
- port-name : "{{ os_port_bootstrap }}"
- name : 'Create the bootstrap floating IP'
os_floating_ip :
state : present
network : "{{ os_external_network }}"
server : "{{ os_bootstrap_server_name }}"
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow