Skip to content

Commit

Permalink
variable fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hitchhooker committed Feb 5, 2024
1 parent 785ec58 commit 8168cc8
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 143 deletions.
14 changes: 7 additions & 7 deletions bkk03
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ bkk00

[polkadot]
dot23
ksm23
wnd23

[cumulus]
Expand All @@ -27,14 +28,14 @@ wbr23
pch23
wch23

[proxmox_hosts]
bkk03

[services]
ibp

[unmanaged]

[proxmox_hosts]
bkk03

[hardware]
bkk03

Expand All @@ -44,7 +45,6 @@ proxmox_nodes
unmanaged

[referrence_nodes]
dot14
dot24
wnd14
wnd24
monitor
dot26
wnd26
22 changes: 8 additions & 14 deletions bkk04
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,16 @@ bkk00
[polkadot]
ksm04
ksm24
; pso24
pso24

[cumulus]
; mine24
; kbr24
; kch24
; pabr24
; pach24
mine24
kbr24

[encointer]
enc14
; enc24
enc24

[services]
ansible
matrix
monitor

[proxmox_hosts]
Expand All @@ -49,7 +43,7 @@ proxmox_nodes
unmanaged

[referrence_nodes]
dot14
dot24
wnd14
wnd24
ksm14
ksm24
ksm26
pso26
29 changes: 0 additions & 29 deletions host_vars/dot24.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion host_vars/ksm24.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ default_dotters_repository: "[email protected]:senseless/dotters-ssl"
default_network: kusama
default_node_type: "endpoint"
default_pruning: "archive"
default_database: rocksdb
default_database: paritydb
default_syncmode: full
default_p2p_port: 33324
default_p2p_port_ws: 34324
Expand Down
2 changes: 1 addition & 1 deletion host_vars/mint26.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ default_node_type: "endpoint"
default_p2p_port: 33616
default_p2p_port_ws: 34616
default_p2p_port_wss: 35616
default_rpc_port: 9716
default_rpc_port: 9616
default_secure_rpc_port: 42616
default_prom_port: 7616
zabbix_ext_port: 10616
29 changes: 0 additions & 29 deletions host_vars/wnd24.yaml

This file was deleted.

34 changes: 19 additions & 15 deletions inventory
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ kbr13
wmint14
wbr13
wch13
mint23
pbr23
pch23
mine24
kbr24
wmint23
wbr23
wch23
mint26
pbr26
pch26
Expand All @@ -42,27 +50,23 @@ enc14
enc26

[polkadot]
ksm01
dot01
ksm02
dot02
dot23
ksm23
wnd23
dot26
ksm26
wnd26
dot14
dot24
ksm01
ksm02
ksm04
pso06
dot14
ksm14
ksm24
wnd14
wnd24
pso01
pso02
pso06
pso16
dot23
dot26
ksm23
ksm24
ksm26
wnd23
wnd26
pso26

[proxmox_hosts]
Expand Down
77 changes: 36 additions & 41 deletions roles/proxmox_setup_nodes/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -1,59 +1,54 @@
# Standards: 0.2
# Standards: 0.2

Check failure on line 1 in roles/proxmox_setup_nodes/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / build (3.10)

yaml[comments-indentation]

Comment not indented like content
---
- name: Create predefined containers
community.general.proxmox:
api_user: "{{ api_user }}"
api_password: "{{ api_password }}"
api_host: "{{ proxmox_defaults.api_host }}"
api_user: "{{ proxmox_defaults.api_user }}"
api_password: "{{ proxmox_defaults.api_password | default(omit) }}"
api_token_id: "{{ proxmox_defaults.api_token_id | default(omit) }}"
api_token_secret: "{{ proxmox_defaults.api_token_secret | default(omit) }}"
node: "{{ item.proxmox_config.node }}"
password: "{{ item.proxmox_config.password }}"
hostname: "{{ item.proxmox_config.hostname }}"
ostemplate: "{{ item.proxmox_config.ostemplate }}"
disk: "{{ item.proxmox_config.disk | default(omit) }}"
cores: "{{ item.proxmox_config.cores | default(omit) }}"
memory: "{{ item.proxmox_config.memory | default(omit) }}"
swap: "{{ item.proxmox_config.swap | default(omit) }}"
netif: "{{ item.proxmox_config.netif | default(omit) }}"
features: "{{ item.proxmox_config.features | to_json | default(omit) }}"
onboot: "{{ item.proxmox_config.onboot | default(omit) }}"
unprivileged: "{{ item.proxmox_config.unprivileged | default(omit) }}"
vmid: "{{ item.proxmox_config.vmid }}"
state: "{{ item.proxmox_config.state | default('present') }}"
hostname: "{{ item.proxmox_config.hostname }}"
template: "{{ item.proxmox_config.ostemplate }}"
netif: "{{ item.proxmox_config.netif }}"
cores: "{{ item.proxmox_config.cores }}"
memory: "{{ item.proxmox_config.memory }}"
swap: "{{ item.proxmox_config.swap }}"
password: "{{ item.proxmox_config.password }}"
disk: "{{ item.proxmox_config.disk }}"
mounts: "{{ item.proxmox_config.mounts }}"
onboot: "{{ item.proxmox_config.onboot }}"
unprivileged: "{{ item.proxmox_config.unprivileged }}"
validate_certs: "{{ item.proxmox_config.validate_certs }}"
description: "{{ item.proxmox_config.description }}"
state: "{{ item.proxmox_config.state }}"
features: "{{ item.proxmox_config.features }}"
loop: "{{ lxc_nodes }}"
when: lxc_nodes is defined
register: container_creation_result
no_log: True # Adjust based on your security policies

- name: Start predefined nodes if not already started
- name: Start predefined nodes
community.general.proxmox:
api_user: "{{ api_user }}"
api_password: "{{ api_password }}"
api_host: "{{ proxmox_defaults.api_host }}"
api_user: "{{ proxmox_defaults.api_user }}"
api_password: "{{ proxmox_defaults.api_password | default(omit) }}"
api_token_id: "{{ proxmox_defaults.api_token_id | default(omit) }}"
api_token_secret: "{{ proxmox_defaults.api_token_secret | default(omit) }}"
node: "{{ item.proxmox_config.node }}"
vmid: "{{ item.proxmox_config.vmid }}"
state: 'started'
loop: "{{ lxc_nodes }}"
when:
- lxc_nodes is defined
- item.proxmox_config.state == 'present'
- "'state' in item.proxmox_config"
- "item.proxmox_config['state'] == 'present'"
register: container_start_result
no_log: True # Adjust based on your security policies

# - name: Create predefined containers
# community.general.proxmox: "{{ proxmox_defaults | combine(item.proxmox_config) }}"
# loop: "{{ lxc_nodes }}"
# when: lxc_nodes is defined
# register: container_creation_result
#
# - name: Start predefined nodes
# community.general.proxmox: "{{ proxmox_defaults | combine({'vmid': item.proxmox_config['vmid'], 'state': 'started'}) }}"
# loop: "{{ lxc_nodes }}"
# when:
# - lxc_nodes is defined
# - item.proxmox_config['state'] == 'present'
# register: container_start_result

# - name: Create predefined containers
# community.general.proxmox: "{{ proxmox_defaults | combine(item.proxmox_config) }}"
# loop: "{{ lxc_nodes }}"
# when: lxc_nodes is defined
# register: container_creation_result
#
# - name: Start predefined nodes
# community.general.proxmox: "{{ proxmox_defaults | combine({'vmid': item.proxmox_config['vmid'], 'state': 'started'}) }}"
# loop: "{{ lxc_nodes }}"
# when:
# - lxc_nodes is defined
# - item.proxmox_config['state'] == 'present'
# register: container_start_result
9 changes: 3 additions & 6 deletions roles/setup_install_nginx/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@

- name: Check certbot plugins
ansible.builtin.command:
cmd: certbot plugins || true
cmd: certbot plugins
register: certbot_plugins_output
failed_when: False
changed_when: False

- name: Install certbot_dns_porkbun plugin if absent
Expand All @@ -34,7 +35,7 @@
-d "{{ default_public_dns }}"
register: certbot_result
changed_when: "'Congratulations' in certbot_result.stdout"
no_log: True
no_log: False

- name: Reload nginx service
ansible.builtin.service:
Expand Down Expand Up @@ -111,7 +112,3 @@
dest: "/etc/nginx/sites-enabled/{{ default_public_dns }}"
state: link
notify: Reload nginx

# - name: Include loadbalancer tasks for endpoints
# ansible.builtin.import_tasks: loadbalancer.yaml
# when: default_node_type == 'endpoint'
1 change: 1 addition & 0 deletions roles/setup_install_prometheus/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
cmd: prometheus --version | grep prometheus | awk '{print substr($3, 0, length($3))}'
register: prometheus_installed
changed_when: False
failed_when: False

- name: Import Prometheus tasks
ansible.builtin.import_tasks: "prometheus-tasks.yaml"
Expand Down

0 comments on commit 8168cc8

Please sign in to comment.