Skip to content

Commit

Permalink
feat: the auto_floating_ip is now a parameter that defaults to false
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobdotcosta committed Nov 7, 2023
1 parent 12cc186 commit af67a37
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion roles/openstack_vm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ collections:
## Role Variables
OpenStack VM role required parameters
OpenStack VM role parameters
| Parameter | Comments |
|-----------|------------|
Expand All @@ -27,6 +27,7 @@ OpenStack VM role required parameters
| `openstack_security_group` <br/>$\color{fuchsia}{\textsf{map}}$ / $\color{red}{\textsf{required}}$ | Security group |
| `state` <br/>$\color{fuchsia}{\textsf{map}}$ / $\color{red}{\textsf{required}}$ | State of the VM <br/> * `present` <br/> * `absent` |
| `vm_name` <br/>$\color{fuchsia}{\textsf{map}}$ / $\color{red}{\textsf{required}}$ | Name of the VM to be created |
| `openstack_vm_auto_floating_ip` <br/>$\color{fuchsia}{\textsf{string}}$ | Auto associate a Floating IP <br/> * **`false` <= Default** <br/> * `true` |

<sup>1)</sup> More information on the available keystone plugins on the
[RHOS documentation](https://docs.openstack.org/keystoneauth/latest/plugin-options.html#available-plugins).
Expand Down
1 change: 1 addition & 0 deletions roles/openstack_vm/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ openstack_defaults:

# login_username: centos
openstack_security_group: spring-boot
openstack_vm_auto_floating_ip: false
2 changes: 1 addition & 1 deletion roles/openstack_vm/tasks/vm_create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
state: "{{ state }}"
timeout: "{{ openstack.timeout | default(openstack_defaults.timeout) }}"
flavor: "{{ openstack.vm.flavor }}"
auto_floating_ip: yes
auto_floating_ip: "{{ openstack_vm_auto_floating_ip }}"
network: "{{ openstack.vm.network | default('') }}"
security_groups: "{{ openstack_security_group }}"
boot_from_volume: "{{ openstack.vm.boot_from_volume | default(false) }}"
Expand Down

0 comments on commit af67a37

Please sign in to comment.