Skip to content

Commit

Permalink
Remove proxmox_lxc_netif variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico Bellack committed Mar 7, 2021
1 parent 97fa5d8 commit dc991e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ Container template to be used.

proxmox_lxc_password: "" # Minimum length is 5

Initial root password for the container.
Initial root password for the container. Either set it globally with this variable or set it for each container
individually, like in the example playbook.

### Optional

Expand Down Expand Up @@ -82,7 +83,6 @@ nodes in your cluster.
proxmox_lxc_memory: 512
proxmox_lxc_mounts: {}
proxmox_lxc_nameserver: ""
proxmox_lxc_netif: {}
proxmox_lxc_onboot: no
proxmox_lxc_pool: ""
proxmox_lxc_pubkey: ""
Expand Down
1 change: 0 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ proxmox_lxc_hookscript: ""
proxmox_lxc_memory: 512
proxmox_lxc_mounts: {}
proxmox_lxc_nameserver: ""
proxmox_lxc_netif: {}
proxmox_lxc_node: "{{ proxmox_lxc_api_host }}"
proxmox_lxc_onboot: no
proxmox_lxc_password: "" # Minimum length is 5
Expand Down
8 changes: 4 additions & 4 deletions tasks/create_lxc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: "Extract specified IP address of LXC '{{ item.hostname }}"
set_fact:
_proxmox_lxc_ip_address: "{{ item.netif | regex_replace('^.*ip=(.*?)\/.*$', '\\1') | trim }}"
when: item.netif is defined or proxmox_lxc_netif | length > 0
when: item.netif is defined

- name: "Create LXC '{{ item.hostname }}'"
community.general.proxmox:
Expand All @@ -25,7 +25,7 @@
onboot: "{{ item.onboot | default(proxmox_lxc_onboot) }}"
ostemplate: "{{ item.ostemplate | default(proxmox_lxc_ostemplate) }}"
password: "{{ item.password | default(proxmox_lxc_password) }}"
netif: "{{ item.netif | default(proxmox_lxc_netif) }}"
netif: "{{ item.netif | default(omit) }}"
pool: "{{ item.pool | default(proxmox_lxc_pool | ternary(proxmox_lxc_pool, omit)) }}"
proxmox_default_behavior: no_defaults
pubkey: "{{ item.pubkey | default(proxmox_lxc_pubkey) }}"
Expand Down Expand Up @@ -65,7 +65,7 @@
delegate_to: "{{ proxmox_lxc_node }}"
when:
- proxmox_lxc_created.changed
- item.netif is defined or proxmox_lxc_netif | length > 0
- item.netif is defined

- name: "Wait until sshd of LXC '{{ item.hostname }}' is ready" # noqa 503
wait_for:
Expand All @@ -75,4 +75,4 @@
timeout: "{{ proxmox_lxc_network_timeout }}"
when:
- proxmox_lxc_created.changed
- item.netif is defined or proxmox_lxc_netif | length > 0
- item.netif is defined

0 comments on commit dc991e3

Please sign in to comment.