diff --git a/.github/workflows/test-molecule.yml b/.github/workflows/test-molecule.yml index caa42dcba3..dd10fea219 100644 --- a/.github/workflows/test-molecule.yml +++ b/.github/workflows/test-molecule.yml @@ -16,11 +16,11 @@ jobs: ] fail-fast: false concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: "3.12" - name: Install depencencies @@ -71,11 +71,11 @@ jobs: tests: [{ role: "update-changes", test: "246" }] fail-fast: false concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: "3.12" - name: Install depencencies @@ -120,115 +120,115 @@ jobs: HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }} ansible_python_interpreter: "/usr/bin/python3" - switch-repos: - strategy: - matrix: - tests: [{ role: "switch-repos", test: "default" }] - fail-fast: false - concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }} - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v5 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.12" - - name: Install depencencies - run: | - pip install ansible==13.3.0 - pip install molecule==25.12.0 - pip install "molecule[docker.lint]" - pip install molecule-plugins==25.8.12 - pip install "molecule-plugins[docker]" - pip install molecule-hetznercloud - pip install docker - pip install hcloud - ansible-galaxy collection install community.docker - - name: Install dependency for pipx - run: | - /opt/pipx/venvs/ansible-core/bin/python -m pip install ansible==13.3.0 - /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule==25.12.0 - /opt/pipx/venvs/ansible-core/bin/python -m pip install "molecule[docker.lint]" - /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule-plugins==25.8.12 - /opt/pipx/venvs/ansible-core/bin/python -m pip install "molecule-plugins[docker]" - /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule-hetznercloud - /opt/pipx/venvs/ansible-core/bin/python -m pip install docker - /opt/pipx/venvs/ansible-core/bin/python -m pip install hcloud - - name: Install ansible-lint - run: sudo apt-get install -y ansible-lint - - name: Molecule version - run: molecule --version - env: - ansible_python_interpreter: "/usr/bin/python3" - - name: Run tests - working-directory: ./controls/roles/${{ matrix.tests.role }} - run: molecule test -s ${{ matrix.tests.test }} - env: - HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }} - ansible_python_interpreter: "/usr/bin/python3" - # destroying is necessary when previous task failed and didn't clean up properly - - name: Destroy previous testing VMs - if: ${{ failure() || cancelled() }} - working-directory: ./controls/roles/${{ matrix.tests.role }} - run: molecule destroy -s ${{ matrix.tests.test }} - env: - HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }} - ansible_python_interpreter: "/usr/bin/python3" + # switch-repos: + # strategy: + # matrix: + # tests: [{ role: "switch-repos", test: "default" }] + # fail-fast: false + # concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }} + # runs-on: ubuntu-24.04 + # steps: + # - uses: actions/checkout@v5 + # - name: Set up Python + # uses: actions/setup-python@v6 + # with: + # python-version: "3.12" + # - name: Install depencencies + # run: | + # pip install ansible==13.3.0 + # pip install molecule==25.12.0 + # pip install "molecule[docker.lint]" + # pip install molecule-plugins==25.8.12 + # pip install "molecule-plugins[docker]" + # pip install molecule-hetznercloud + # pip install docker + # pip install hcloud + # ansible-galaxy collection install community.docker + # - name: Install dependency for pipx + # run: | + # /opt/pipx/venvs/ansible-core/bin/python -m pip install ansible==13.3.0 + # /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule==25.12.0 + # /opt/pipx/venvs/ansible-core/bin/python -m pip install "molecule[docker.lint]" + # /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule-plugins==25.8.12 + # /opt/pipx/venvs/ansible-core/bin/python -m pip install "molecule-plugins[docker]" + # /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule-hetznercloud + # /opt/pipx/venvs/ansible-core/bin/python -m pip install docker + # /opt/pipx/venvs/ansible-core/bin/python -m pip install hcloud + # - name: Install ansible-lint + # run: sudo apt-get install -y ansible-lint + # - name: Molecule version + # run: molecule --version + # env: + # ansible_python_interpreter: "/usr/bin/python3" + # - name: Run tests + # working-directory: ./controls/roles/${{ matrix.tests.role }} + # run: molecule test -s ${{ matrix.tests.test }} + # env: + # HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }} + # ansible_python_interpreter: "/usr/bin/python3" + # # destroying is necessary when previous task failed and didn't clean up properly + # - name: Destroy previous testing VMs + # if: ${{ failure() || cancelled() }} + # working-directory: ./controls/roles/${{ matrix.tests.role }} + # run: molecule destroy -s ${{ matrix.tests.test }} + # env: + # HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }} + # ansible_python_interpreter: "/usr/bin/python3" - update-package: - strategy: - matrix: - tests: [{ role: "update-package", test: "default" }] - fail-fast: false - concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }} - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v5 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.12" - - name: Install depencencies - run: | - pip install ansible==13.3.0 - pip install molecule==25.12.0 - pip install "molecule[docker.lint]" - pip install molecule-plugins==25.8.12 - pip install "molecule-plugins[docker]" - pip install molecule-hetznercloud - pip install docker - pip install hcloud - ansible-galaxy collection install community.docker - - name: Install dependency for pipx - run: | - /opt/pipx/venvs/ansible-core/bin/python -m pip install ansible==13.3.0 - /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule==25.12.0 - /opt/pipx/venvs/ansible-core/bin/python -m pip install "molecule[docker.lint]" - /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule-plugins==25.8.12 - /opt/pipx/venvs/ansible-core/bin/python -m pip install "molecule-plugins[docker]" - /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule-hetznercloud - /opt/pipx/venvs/ansible-core/bin/python -m pip install docker - /opt/pipx/venvs/ansible-core/bin/python -m pip install hcloud - - name: Install ansible-lint - run: sudo apt-get install -y ansible-lint - - name: Molecule version - run: molecule --version - env: - ansible_python_interpreter: "/usr/bin/python3" - - name: Run tests - working-directory: ./controls/roles/${{ matrix.tests.role }} - run: molecule test -s ${{ matrix.tests.test }} - env: - HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }} - ansible_python_interpreter: "/usr/bin/python3" - # destroying is necessary when previous task failed and didn't clean up properly - - name: Destroy previous testing VMs - if: ${{ failure() || cancelled() }} - working-directory: ./controls/roles/${{ matrix.tests.role }} - run: molecule destroy -s ${{ matrix.tests.test }} - env: - HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }} - ansible_python_interpreter: "/usr/bin/python3" + # update-package: + # strategy: + # matrix: + # tests: [{ role: "update-package", test: "default" }] + # fail-fast: false + # concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }} + # runs-on: ubuntu-24.04 + # steps: + # - uses: actions/checkout@v5 + # - name: Set up Python + # uses: actions/setup-python@v6 + # with: + # python-version: "3.12" + # - name: Install depencencies + # run: | + # pip install ansible==13.3.0 + # pip install molecule==25.12.0 + # pip install "molecule[docker.lint]" + # pip install molecule-plugins==25.8.12 + # pip install "molecule-plugins[docker]" + # pip install molecule-hetznercloud + # pip install docker + # pip install hcloud + # ansible-galaxy collection install community.docker + # - name: Install dependency for pipx + # run: | + # /opt/pipx/venvs/ansible-core/bin/python -m pip install ansible==13.3.0 + # /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule==25.12.0 + # /opt/pipx/venvs/ansible-core/bin/python -m pip install "molecule[docker.lint]" + # /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule-plugins==25.8.12 + # /opt/pipx/venvs/ansible-core/bin/python -m pip install "molecule-plugins[docker]" + # /opt/pipx/venvs/ansible-core/bin/python -m pip install molecule-hetznercloud + # /opt/pipx/venvs/ansible-core/bin/python -m pip install docker + # /opt/pipx/venvs/ansible-core/bin/python -m pip install hcloud + # - name: Install ansible-lint + # run: sudo apt-get install -y ansible-lint + # - name: Molecule version + # run: molecule --version + # env: + # ansible_python_interpreter: "/usr/bin/python3" + # - name: Run tests + # working-directory: ./controls/roles/${{ matrix.tests.role }} + # run: molecule test -s ${{ matrix.tests.test }} + # env: + # HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }} + # ansible_python_interpreter: "/usr/bin/python3" + # # destroying is necessary when previous task failed and didn't clean up properly + # - name: Destroy previous testing VMs + # if: ${{ failure() || cancelled() }} + # working-directory: ./controls/roles/${{ matrix.tests.role }} + # run: molecule destroy -s ${{ matrix.tests.test }} + # env: + # HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }} + # ansible_python_interpreter: "/usr/bin/python3" restart-services: strategy: @@ -236,11 +236,11 @@ jobs: tests: [{ role: "restart-services", test: "default" }] fail-fast: false concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: "3.12" - name: Install depencencies @@ -294,11 +294,11 @@ jobs: # ] # fail-fast: false # concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }} - # runs-on: ubuntu-22.04 + # runs-on: ubuntu-24.04 # steps: # - uses: actions/checkout@v5 # - name: Set up Python - # uses: actions/setup-python@v4 + # uses: actions/setup-python@v6 # with: # python-version: '3.9' # - name: Install depencencies @@ -349,11 +349,11 @@ jobs: tests: [{ role: "setup", test: "default" }] fail-fast: false concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: "3.12" - name: Install depencencies @@ -456,11 +456,11 @@ jobs: ] fail-fast: false concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: "3.12" - name: Install depencencies @@ -513,11 +513,11 @@ jobs: tests: [{ role: "ssv-key-generator", test: "default" }] fail-fast: false concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: "3.12" - name: Install depencencies @@ -574,11 +574,11 @@ jobs: ] fail-fast: false concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: "3.12" - name: Install depencencies @@ -636,11 +636,11 @@ jobs: ] fail-fast: false concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: "3.12" - name: Install depencencies diff --git a/controls/poetry.lock b/controls/poetry.lock index 9719e0208d..7999b8a9f5 100644 --- a/controls/poetry.lock +++ b/controls/poetry.lock @@ -1273,4 +1273,4 @@ bracex = ">=2.1.1" [metadata] lock-version = "2.1" python-versions = "^3.12" -content-hash = "4c34d05062904802f9a48178a8955014bdb2b318b37f6b89f226e2e0f47aa922" +content-hash = "8d08ad92697a4cca255e956e4f9964af30f8a8c7f13f81e09a8523cdf9bf6c8b" diff --git a/controls/roles/configure-firewall/molecule/default/prepare.yml b/controls/roles/configure-firewall/molecule/default/prepare.yml index a9d5aafa9f..6ec726d3b4 100644 --- a/controls/roles/configure-firewall/molecule/default/prepare.yml +++ b/controls/roles/configure-firewall/molecule/default/prepare.yml @@ -7,10 +7,10 @@ update_cache: yes become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" # - name: Install python for Ansible (CentOS 8) # raw: yum install -y crontabs # become: true # changed_when: false - # when: ansible_distribution == "CentOS" + # when: ansible_facts['distribution'] == "CentOS" diff --git a/controls/roles/configure-firewall/tasks/packages.yaml b/controls/roles/configure-firewall/tasks/packages.yaml index 08f119e40e..b78905c34f 100644 --- a/controls/roles/configure-firewall/tasks/packages.yaml +++ b/controls/roles/configure-firewall/tasks/packages.yaml @@ -4,7 +4,7 @@ name: - ufw - fail2ban - when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' + when: ansible_facts['distribution'] == 'Debian' or ansible_facts['distribution'] == 'Ubuntu' - name: Install ufw, fail2ban yum: @@ -12,6 +12,5 @@ - ufw - fail2ban state: present - when: ansible_distribution == "CentOS" - + when: ansible_facts['distribution'] == "CentOS" # EOF diff --git a/controls/roles/configure-firewall/tasks/ufw.yaml b/controls/roles/configure-firewall/tasks/ufw.yaml index f1ebb147db..6080bde66c 100644 --- a/controls/roles/configure-firewall/tasks/ufw.yaml +++ b/controls/roles/configure-firewall/tasks/ufw.yaml @@ -20,7 +20,7 @@ direction: incoming policy: deny environment: - PATH: /sbin:{{ ansible_env.PATH }} + PATH: /sbin:{{ ansible_facts['env'].PATH }} - name: Firewall allow ssh ports ufw: @@ -30,6 +30,5 @@ proto: tcp with_items: "{{ common_ssh_ports }}" environment: - PATH: /sbin:{{ ansible_env.PATH }} - + PATH: /sbin:{{ ansible_facts['env'].PATH }} # EOF diff --git a/controls/roles/configure-updates/molecule/default/molecule.yml b/controls/roles/configure-updates/molecule/default/molecule.yml index 321c17f01f..f3f07fbf55 100644 --- a/controls/roles/configure-updates/molecule/default/molecule.yml +++ b/controls/roles/configure-updates/molecule/default/molecule.yml @@ -4,8 +4,8 @@ driver: name: docker platforms: - - name: "configure-updates--default--ubuntu-22.04" - image: ubuntu:jammy + - name: "configure-updates--default--ubuntu-24.04" + image: ubuntu:noble # - name: "configure-updates--default--centos-8" # image: geerlingguy/docker-centos8-ansible provisioner: diff --git a/controls/roles/configure-updates/molecule/default/prepare.yml b/controls/roles/configure-updates/molecule/default/prepare.yml index 8246f0320f..33365fda7f 100644 --- a/controls/roles/configure-updates/molecule/default/prepare.yml +++ b/controls/roles/configure-updates/molecule/default/prepare.yml @@ -8,10 +8,10 @@ update_cache: yes become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y crontabs become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" diff --git a/controls/roles/configure-updates/molecule/no-unattended-updates/molecule.yml b/controls/roles/configure-updates/molecule/no-unattended-updates/molecule.yml index 3fbb55ddf5..7ee6e78a73 100644 --- a/controls/roles/configure-updates/molecule/no-unattended-updates/molecule.yml +++ b/controls/roles/configure-updates/molecule/no-unattended-updates/molecule.yml @@ -4,10 +4,10 @@ driver: name: docker platforms: - - name: "configure-updates--default--ubuntu-20.04" - image: ubuntu:focal - - name: "configure-updates--default--ubuntu-22.04" - image: ubuntu:jammy + - name: "configure-updates--default--ubuntu-24.04" + image: ubuntu:noble + - name: "configure-updates--default--ubuntu-24.04" + image: ubuntu:noble # - name: "configure-updates--default--centos-8" # image: geerlingguy/docker-centos8-ansible provisioner: diff --git a/controls/roles/configure-updates/molecule/no-unattended-updates/prepare.yml b/controls/roles/configure-updates/molecule/no-unattended-updates/prepare.yml index 04bcfcf8d9..02bea7dc64 100644 --- a/controls/roles/configure-updates/molecule/no-unattended-updates/prepare.yml +++ b/controls/roles/configure-updates/molecule/no-unattended-updates/prepare.yml @@ -9,10 +9,10 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y crontabs become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" diff --git a/controls/roles/initiate-devnet-genesis/molecule/default/create.yml b/controls/roles/initiate-devnet-genesis/molecule/default/create.yml index be7da8b9fa..2ac515d01d 100644 --- a/controls/roles/initiate-devnet-genesis/molecule/default/create.yml +++ b/controls/roles/initiate-devnet-genesis/molecule/default/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present diff --git a/controls/roles/initiate-devnet-genesis/molecule/default/destroy.yml b/controls/roles/initiate-devnet-genesis/molecule/default/destroy.yml index 762495a2ef..8a0d5947ae 100644 --- a/controls/roles/initiate-devnet-genesis/molecule/default/destroy.yml +++ b/controls/roles/initiate-devnet-genesis/molecule/default/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/initiate-devnet-genesis/molecule/default/molecule.yml b/controls/roles/initiate-devnet-genesis/molecule/default/molecule.yml index 9c2cd620d5..f588758a71 100644 --- a/controls/roles/initiate-devnet-genesis/molecule/default/molecule.yml +++ b/controls/roles/initiate-devnet-genesis/molecule/default/molecule.yml @@ -4,9 +4,10 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "initiate-devnet-genesis--default--ubuntu-22.04" - server_type: cx22 - image: ubuntu-22.04 + - name: "initiate-devnet-genesis--default--ubuntu-24.04" + server_type: cpx11 + image: ubuntu-24.04 + location: hil provisioner: name: ansible config_options: diff --git a/controls/roles/manage-service/molecule/besu-lighthouse/create.yml b/controls/roles/manage-service/molecule/besu-lighthouse/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/besu-lighthouse/create.yml +++ b/controls/roles/manage-service/molecule/besu-lighthouse/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/besu-lighthouse/destroy.yml b/controls/roles/manage-service/molecule/besu-lighthouse/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/besu-lighthouse/destroy.yml +++ b/controls/roles/manage-service/molecule/besu-lighthouse/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/besu-lighthouse/molecule.yml b/controls/roles/manage-service/molecule/besu-lighthouse/molecule.yml index cb92f285a9..11bbe010cf 100644 --- a/controls/roles/manage-service/molecule/besu-lighthouse/molecule.yml +++ b/controls/roles/manage-service/molecule/besu-lighthouse/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--besu-lighthouse--ubuntu-22.04" + - name: "manage-service--besu-lighthouse--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--besu-lighthouse--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/besu-lighthouse/prepare.yml b/controls/roles/manage-service/molecule/besu-lighthouse/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/besu-lighthouse/prepare.yml +++ b/controls/roles/manage-service/molecule/besu-lighthouse/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/besu-lodestar/create.yml b/controls/roles/manage-service/molecule/besu-lodestar/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/besu-lodestar/create.yml +++ b/controls/roles/manage-service/molecule/besu-lodestar/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/besu-lodestar/destroy.yml b/controls/roles/manage-service/molecule/besu-lodestar/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/besu-lodestar/destroy.yml +++ b/controls/roles/manage-service/molecule/besu-lodestar/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/besu-lodestar/molecule.yml b/controls/roles/manage-service/molecule/besu-lodestar/molecule.yml index 640d1e1f17..06370bda50 100644 --- a/controls/roles/manage-service/molecule/besu-lodestar/molecule.yml +++ b/controls/roles/manage-service/molecule/besu-lodestar/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--mevboost-besu-lodestar--ubuntu-22.04" + - name: "manage-service--mevboost-besu-lodestar--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--mevboost-besu-lodestar--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/besu-lodestar/prepare.yml b/controls/roles/manage-service/molecule/besu-lodestar/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/besu-lodestar/prepare.yml +++ b/controls/roles/manage-service/molecule/besu-lodestar/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/besu-nimbus/create.yml b/controls/roles/manage-service/molecule/besu-nimbus/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/besu-nimbus/create.yml +++ b/controls/roles/manage-service/molecule/besu-nimbus/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/besu-nimbus/destroy.yml b/controls/roles/manage-service/molecule/besu-nimbus/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/besu-nimbus/destroy.yml +++ b/controls/roles/manage-service/molecule/besu-nimbus/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/besu-nimbus/molecule.yml b/controls/roles/manage-service/molecule/besu-nimbus/molecule.yml index 5260a30596..2e2c491a55 100644 --- a/controls/roles/manage-service/molecule/besu-nimbus/molecule.yml +++ b/controls/roles/manage-service/molecule/besu-nimbus/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--besu-nimbus--ubuntu-22.04" + - name: "manage-service--besu-nimbus--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--besu-nimbus--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/besu-nimbus/prepare.yml b/controls/roles/manage-service/molecule/besu-nimbus/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/besu-nimbus/prepare.yml +++ b/controls/roles/manage-service/molecule/besu-nimbus/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/besu-prysm/create.yml b/controls/roles/manage-service/molecule/besu-prysm/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/besu-prysm/create.yml +++ b/controls/roles/manage-service/molecule/besu-prysm/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/besu-prysm/destroy.yml b/controls/roles/manage-service/molecule/besu-prysm/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/besu-prysm/destroy.yml +++ b/controls/roles/manage-service/molecule/besu-prysm/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/besu-prysm/molecule.yml b/controls/roles/manage-service/molecule/besu-prysm/molecule.yml index 1fbf4b94f9..405120d431 100644 --- a/controls/roles/manage-service/molecule/besu-prysm/molecule.yml +++ b/controls/roles/manage-service/molecule/besu-prysm/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--besu-prysm--ubuntu-22.04" + - name: "manage-service--besu-prysm--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--besu-prysm--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/besu-prysm/prepare.yml b/controls/roles/manage-service/molecule/besu-prysm/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/besu-prysm/prepare.yml +++ b/controls/roles/manage-service/molecule/besu-prysm/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/besu-teku/create.yml b/controls/roles/manage-service/molecule/besu-teku/create.yml index c0bccae41e..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/besu-teku/create.yml +++ b/controls/roles/manage-service/molecule/besu-teku/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/besu-teku/destroy.yml b/controls/roles/manage-service/molecule/besu-teku/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/besu-teku/destroy.yml +++ b/controls/roles/manage-service/molecule/besu-teku/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/besu-teku/molecule.yml b/controls/roles/manage-service/molecule/besu-teku/molecule.yml index 9bb5102ed4..85b09192bb 100644 --- a/controls/roles/manage-service/molecule/besu-teku/molecule.yml +++ b/controls/roles/manage-service/molecule/besu-teku/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--besu-teku--ubuntu-22.04" + - name: "manage-service--besu-teku--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--besu-teku--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/besu-teku/prepare.yml b/controls/roles/manage-service/molecule/besu-teku/prepare.yml index cd799070c5..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/besu-teku/prepare.yml +++ b/controls/roles/manage-service/molecule/besu-teku/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - # EOF diff --git a/controls/roles/manage-service/molecule/erigon-lighthouse/create.yml b/controls/roles/manage-service/molecule/erigon-lighthouse/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/erigon-lighthouse/create.yml +++ b/controls/roles/manage-service/molecule/erigon-lighthouse/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/erigon-lighthouse/destroy.yml b/controls/roles/manage-service/molecule/erigon-lighthouse/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/erigon-lighthouse/destroy.yml +++ b/controls/roles/manage-service/molecule/erigon-lighthouse/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/erigon-lighthouse/molecule.yml b/controls/roles/manage-service/molecule/erigon-lighthouse/molecule.yml index 272418cb41..f6b2aa28f9 100644 --- a/controls/roles/manage-service/molecule/erigon-lighthouse/molecule.yml +++ b/controls/roles/manage-service/molecule/erigon-lighthouse/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--erigon-lighthouse--ubuntu-22.04" + - name: "manage-service--erigon-lighthouse--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--erigon-lighthouse--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/erigon-lighthouse/prepare.yml b/controls/roles/manage-service/molecule/erigon-lighthouse/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/erigon-lighthouse/prepare.yml +++ b/controls/roles/manage-service/molecule/erigon-lighthouse/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/erigon-lodestar/create.yml b/controls/roles/manage-service/molecule/erigon-lodestar/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/erigon-lodestar/create.yml +++ b/controls/roles/manage-service/molecule/erigon-lodestar/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/erigon-lodestar/destroy.yml b/controls/roles/manage-service/molecule/erigon-lodestar/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/erigon-lodestar/destroy.yml +++ b/controls/roles/manage-service/molecule/erigon-lodestar/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/erigon-lodestar/molecule.yml b/controls/roles/manage-service/molecule/erigon-lodestar/molecule.yml index f11602acd8..9f4e590b8a 100644 --- a/controls/roles/manage-service/molecule/erigon-lodestar/molecule.yml +++ b/controls/roles/manage-service/molecule/erigon-lodestar/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--erigon-lodestar--ubuntu-22.04" + - name: "manage-service--erigon-lodestar--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--erigon-lodestar--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/erigon-lodestar/prepare.yml b/controls/roles/manage-service/molecule/erigon-lodestar/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/erigon-lodestar/prepare.yml +++ b/controls/roles/manage-service/molecule/erigon-lodestar/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/erigon-prysm/create.yml b/controls/roles/manage-service/molecule/erigon-prysm/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/erigon-prysm/create.yml +++ b/controls/roles/manage-service/molecule/erigon-prysm/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/erigon-prysm/destroy.yml b/controls/roles/manage-service/molecule/erigon-prysm/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/erigon-prysm/destroy.yml +++ b/controls/roles/manage-service/molecule/erigon-prysm/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/erigon-prysm/molecule.yml b/controls/roles/manage-service/molecule/erigon-prysm/molecule.yml index c21874005a..bd08374f3c 100644 --- a/controls/roles/manage-service/molecule/erigon-prysm/molecule.yml +++ b/controls/roles/manage-service/molecule/erigon-prysm/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--erigon-prysm--ubuntu-22.04" + - name: "manage-service--erigon-prysm--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--erigon-prysm--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/erigon-prysm/prepare.yml b/controls/roles/manage-service/molecule/erigon-prysm/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/erigon-prysm/prepare.yml +++ b/controls/roles/manage-service/molecule/erigon-prysm/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/geth-lighthouse/create.yml b/controls/roles/manage-service/molecule/geth-lighthouse/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/geth-lighthouse/create.yml +++ b/controls/roles/manage-service/molecule/geth-lighthouse/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/geth-lighthouse/destroy.yml b/controls/roles/manage-service/molecule/geth-lighthouse/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/geth-lighthouse/destroy.yml +++ b/controls/roles/manage-service/molecule/geth-lighthouse/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/geth-lighthouse/molecule.yml b/controls/roles/manage-service/molecule/geth-lighthouse/molecule.yml index 4f131df635..c939e23592 100644 --- a/controls/roles/manage-service/molecule/geth-lighthouse/molecule.yml +++ b/controls/roles/manage-service/molecule/geth-lighthouse/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--geth-lighthouse--ubuntu-22.04" + - name: "manage-service--geth-lighthouse--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--geth-lighthouse--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/geth-lighthouse/prepare.yml b/controls/roles/manage-service/molecule/geth-lighthouse/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/geth-lighthouse/prepare.yml +++ b/controls/roles/manage-service/molecule/geth-lighthouse/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/geth-nimbus/create.yml b/controls/roles/manage-service/molecule/geth-nimbus/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/geth-nimbus/create.yml +++ b/controls/roles/manage-service/molecule/geth-nimbus/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/geth-nimbus/destroy.yml b/controls/roles/manage-service/molecule/geth-nimbus/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/geth-nimbus/destroy.yml +++ b/controls/roles/manage-service/molecule/geth-nimbus/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/geth-nimbus/molecule.yml b/controls/roles/manage-service/molecule/geth-nimbus/molecule.yml index 4fbdea6f59..f2464f489b 100644 --- a/controls/roles/manage-service/molecule/geth-nimbus/molecule.yml +++ b/controls/roles/manage-service/molecule/geth-nimbus/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--geth-nimbus--ubuntu-22.04" + - name: "manage-service--geth-nimbus--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--geth-nimbus--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/geth-nimbus/prepare.yml b/controls/roles/manage-service/molecule/geth-nimbus/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/geth-nimbus/prepare.yml +++ b/controls/roles/manage-service/molecule/geth-nimbus/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/geth-prysm/create.yml b/controls/roles/manage-service/molecule/geth-prysm/create.yml index c0bccae41e..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/geth-prysm/create.yml +++ b/controls/roles/manage-service/molecule/geth-prysm/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/geth-prysm/destroy.yml b/controls/roles/manage-service/molecule/geth-prysm/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/geth-prysm/destroy.yml +++ b/controls/roles/manage-service/molecule/geth-prysm/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/geth-prysm/molecule.yml b/controls/roles/manage-service/molecule/geth-prysm/molecule.yml index 4075beb3e8..e9c7b080d0 100644 --- a/controls/roles/manage-service/molecule/geth-prysm/molecule.yml +++ b/controls/roles/manage-service/molecule/geth-prysm/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--geth-prysm--ubuntu-22.04" + - name: "manage-service--geth-prysm--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--geth-prysm--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/geth-prysm/prepare.yml b/controls/roles/manage-service/molecule/geth-prysm/prepare.yml index cd799070c5..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/geth-prysm/prepare.yml +++ b/controls/roles/manage-service/molecule/geth-prysm/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - # EOF diff --git a/controls/roles/manage-service/molecule/geth-teku/create.yml b/controls/roles/manage-service/molecule/geth-teku/create.yml index c0bccae41e..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/geth-teku/create.yml +++ b/controls/roles/manage-service/molecule/geth-teku/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/geth-teku/destroy.yml b/controls/roles/manage-service/molecule/geth-teku/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/geth-teku/destroy.yml +++ b/controls/roles/manage-service/molecule/geth-teku/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/geth-teku/molecule.yml b/controls/roles/manage-service/molecule/geth-teku/molecule.yml index c00d59402e..293eba933f 100644 --- a/controls/roles/manage-service/molecule/geth-teku/molecule.yml +++ b/controls/roles/manage-service/molecule/geth-teku/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--geth-teku--ubuntu-22.04" + - name: "manage-service--geth-teku--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--geth-teku--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/geth-teku/prepare.yml b/controls/roles/manage-service/molecule/geth-teku/prepare.yml index cd799070c5..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/geth-teku/prepare.yml +++ b/controls/roles/manage-service/molecule/geth-teku/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - # EOF diff --git a/controls/roles/manage-service/molecule/mevboost-besu-lighthouse/create.yml b/controls/roles/manage-service/molecule/mevboost-besu-lighthouse/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/mevboost-besu-lighthouse/create.yml +++ b/controls/roles/manage-service/molecule/mevboost-besu-lighthouse/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/mevboost-besu-lighthouse/destroy.yml b/controls/roles/manage-service/molecule/mevboost-besu-lighthouse/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/mevboost-besu-lighthouse/destroy.yml +++ b/controls/roles/manage-service/molecule/mevboost-besu-lighthouse/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/mevboost-besu-lighthouse/molecule.yml b/controls/roles/manage-service/molecule/mevboost-besu-lighthouse/molecule.yml index 11d31b5d7d..25d82b1e36 100644 --- a/controls/roles/manage-service/molecule/mevboost-besu-lighthouse/molecule.yml +++ b/controls/roles/manage-service/molecule/mevboost-besu-lighthouse/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--mevboost-besu-lighthouse--ubuntu-22.04" + - name: "manage-service--mevboost-besu-lighthouse--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--mevboost-besu-lighthouse--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/mevboost-besu-lighthouse/prepare.yml b/controls/roles/manage-service/molecule/mevboost-besu-lighthouse/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/mevboost-besu-lighthouse/prepare.yml +++ b/controls/roles/manage-service/molecule/mevboost-besu-lighthouse/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/mevboost-besu-nimbus/create.yml b/controls/roles/manage-service/molecule/mevboost-besu-nimbus/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/mevboost-besu-nimbus/create.yml +++ b/controls/roles/manage-service/molecule/mevboost-besu-nimbus/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/mevboost-besu-nimbus/destroy.yml b/controls/roles/manage-service/molecule/mevboost-besu-nimbus/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/mevboost-besu-nimbus/destroy.yml +++ b/controls/roles/manage-service/molecule/mevboost-besu-nimbus/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/mevboost-besu-nimbus/molecule.yml b/controls/roles/manage-service/molecule/mevboost-besu-nimbus/molecule.yml index 82cecc7ffc..c51ae571ab 100644 --- a/controls/roles/manage-service/molecule/mevboost-besu-nimbus/molecule.yml +++ b/controls/roles/manage-service/molecule/mevboost-besu-nimbus/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--mevboost-besu-nimbus--ubuntu-22.04" + - name: "manage-service--mevboost-besu-nimbus--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--mevboost-besu-nimbus--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/mevboost-besu-nimbus/prepare.yml b/controls/roles/manage-service/molecule/mevboost-besu-nimbus/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/mevboost-besu-nimbus/prepare.yml +++ b/controls/roles/manage-service/molecule/mevboost-besu-nimbus/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/mevboost-besu-prysm/create.yml b/controls/roles/manage-service/molecule/mevboost-besu-prysm/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/mevboost-besu-prysm/create.yml +++ b/controls/roles/manage-service/molecule/mevboost-besu-prysm/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/mevboost-besu-prysm/destroy.yml b/controls/roles/manage-service/molecule/mevboost-besu-prysm/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/mevboost-besu-prysm/destroy.yml +++ b/controls/roles/manage-service/molecule/mevboost-besu-prysm/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/mevboost-besu-prysm/molecule.yml b/controls/roles/manage-service/molecule/mevboost-besu-prysm/molecule.yml index 56eff0c5e6..174425f967 100644 --- a/controls/roles/manage-service/molecule/mevboost-besu-prysm/molecule.yml +++ b/controls/roles/manage-service/molecule/mevboost-besu-prysm/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--mevboost-besu-prysm--ubuntu-22.04" + - name: "manage-service--mevboost-besu-prysm--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--mevboost-besu-prysm--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/mevboost-besu-prysm/prepare.yml b/controls/roles/manage-service/molecule/mevboost-besu-prysm/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/mevboost-besu-prysm/prepare.yml +++ b/controls/roles/manage-service/molecule/mevboost-besu-prysm/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/mevboost-besu-teku/create.yml b/controls/roles/manage-service/molecule/mevboost-besu-teku/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/mevboost-besu-teku/create.yml +++ b/controls/roles/manage-service/molecule/mevboost-besu-teku/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/mevboost-besu-teku/destroy.yml b/controls/roles/manage-service/molecule/mevboost-besu-teku/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/mevboost-besu-teku/destroy.yml +++ b/controls/roles/manage-service/molecule/mevboost-besu-teku/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/mevboost-besu-teku/molecule.yml b/controls/roles/manage-service/molecule/mevboost-besu-teku/molecule.yml index 4267ffae0a..613d4545bf 100644 --- a/controls/roles/manage-service/molecule/mevboost-besu-teku/molecule.yml +++ b/controls/roles/manage-service/molecule/mevboost-besu-teku/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--mevboost-besu-teku--ubuntu-22.04" + - name: "manage-service--mevboost-besu-teku--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--mevboost-besu-teku--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/mevboost-besu-teku/prepare.yml b/controls/roles/manage-service/molecule/mevboost-besu-teku/prepare.yml index d4fed0fda5..d17b66bd78 100644 --- a/controls/roles/manage-service/molecule/mevboost-besu-teku/prepare.yml +++ b/controls/roles/manage-service/molecule/mevboost-besu-teku/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -18,19 +18,19 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - name: Install keytool for creating Keystore (CentOS 8) raw: yum install -y java-1.8.0-openjdk become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - name: Install pip, expect (CentOS 8) yum: @@ -39,12 +39,11 @@ - expect state: latest become: true - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/mevboost-erigon-lodestar/create.yml b/controls/roles/manage-service/molecule/mevboost-erigon-lodestar/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/mevboost-erigon-lodestar/create.yml +++ b/controls/roles/manage-service/molecule/mevboost-erigon-lodestar/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/mevboost-erigon-lodestar/destroy.yml b/controls/roles/manage-service/molecule/mevboost-erigon-lodestar/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/mevboost-erigon-lodestar/destroy.yml +++ b/controls/roles/manage-service/molecule/mevboost-erigon-lodestar/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/mevboost-erigon-lodestar/molecule.yml b/controls/roles/manage-service/molecule/mevboost-erigon-lodestar/molecule.yml index 8cc57b8138..20612e74a1 100644 --- a/controls/roles/manage-service/molecule/mevboost-erigon-lodestar/molecule.yml +++ b/controls/roles/manage-service/molecule/mevboost-erigon-lodestar/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--mevboost-erigon-lodestar--ubuntu-22.04" + - name: "manage-service--mevboost-erigon-lodestar--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--mevboost-erigon-lodestar--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/mevboost-erigon-lodestar/prepare.yml b/controls/roles/manage-service/molecule/mevboost-erigon-lodestar/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/mevboost-erigon-lodestar/prepare.yml +++ b/controls/roles/manage-service/molecule/mevboost-erigon-lodestar/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/mevboost-geth-lighthouse/create.yml b/controls/roles/manage-service/molecule/mevboost-geth-lighthouse/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/mevboost-geth-lighthouse/create.yml +++ b/controls/roles/manage-service/molecule/mevboost-geth-lighthouse/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/mevboost-geth-lighthouse/destroy.yml b/controls/roles/manage-service/molecule/mevboost-geth-lighthouse/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/mevboost-geth-lighthouse/destroy.yml +++ b/controls/roles/manage-service/molecule/mevboost-geth-lighthouse/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/mevboost-geth-lighthouse/molecule.yml b/controls/roles/manage-service/molecule/mevboost-geth-lighthouse/molecule.yml index 04494c1619..7c8626cc79 100644 --- a/controls/roles/manage-service/molecule/mevboost-geth-lighthouse/molecule.yml +++ b/controls/roles/manage-service/molecule/mevboost-geth-lighthouse/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--mevboost-geth-lighthouse--ubuntu-22.04" + - name: "manage-service--mevboost-geth-lighthouse--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--mevboost-geth-lighthouse--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/mevboost-geth-lighthouse/prepare.yml b/controls/roles/manage-service/molecule/mevboost-geth-lighthouse/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/mevboost-geth-lighthouse/prepare.yml +++ b/controls/roles/manage-service/molecule/mevboost-geth-lighthouse/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/mevboost-geth-nimbus/create.yml b/controls/roles/manage-service/molecule/mevboost-geth-nimbus/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/mevboost-geth-nimbus/create.yml +++ b/controls/roles/manage-service/molecule/mevboost-geth-nimbus/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/mevboost-geth-nimbus/destroy.yml b/controls/roles/manage-service/molecule/mevboost-geth-nimbus/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/mevboost-geth-nimbus/destroy.yml +++ b/controls/roles/manage-service/molecule/mevboost-geth-nimbus/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/mevboost-geth-nimbus/molecule.yml b/controls/roles/manage-service/molecule/mevboost-geth-nimbus/molecule.yml index 23f1d37921..d9413e8d10 100644 --- a/controls/roles/manage-service/molecule/mevboost-geth-nimbus/molecule.yml +++ b/controls/roles/manage-service/molecule/mevboost-geth-nimbus/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--mevboost-geth-nimbus--ubuntu-22.04" + - name: "manage-service--mevboost-geth-nimbus--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--mevboost-geth-nimbus--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/mevboost-geth-nimbus/prepare.yml b/controls/roles/manage-service/molecule/mevboost-geth-nimbus/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/mevboost-geth-nimbus/prepare.yml +++ b/controls/roles/manage-service/molecule/mevboost-geth-nimbus/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/mevboost-geth-prysm/create.yml b/controls/roles/manage-service/molecule/mevboost-geth-prysm/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/mevboost-geth-prysm/create.yml +++ b/controls/roles/manage-service/molecule/mevboost-geth-prysm/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/mevboost-geth-prysm/destroy.yml b/controls/roles/manage-service/molecule/mevboost-geth-prysm/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/mevboost-geth-prysm/destroy.yml +++ b/controls/roles/manage-service/molecule/mevboost-geth-prysm/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/mevboost-geth-prysm/molecule.yml b/controls/roles/manage-service/molecule/mevboost-geth-prysm/molecule.yml index ec35d48a0b..e505abffe9 100644 --- a/controls/roles/manage-service/molecule/mevboost-geth-prysm/molecule.yml +++ b/controls/roles/manage-service/molecule/mevboost-geth-prysm/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--mevboost-geth-prysm--ubuntu-22.04" + - name: "manage-service--mevboost-geth-prysm--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--mevboost-geth-prysm--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/mevboost-geth-prysm/prepare.yml b/controls/roles/manage-service/molecule/mevboost-geth-prysm/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/mevboost-geth-prysm/prepare.yml +++ b/controls/roles/manage-service/molecule/mevboost-geth-prysm/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/mevboost-geth-teku/create.yml b/controls/roles/manage-service/molecule/mevboost-geth-teku/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/mevboost-geth-teku/create.yml +++ b/controls/roles/manage-service/molecule/mevboost-geth-teku/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/mevboost-geth-teku/destroy.yml b/controls/roles/manage-service/molecule/mevboost-geth-teku/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/mevboost-geth-teku/destroy.yml +++ b/controls/roles/manage-service/molecule/mevboost-geth-teku/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/mevboost-geth-teku/molecule.yml b/controls/roles/manage-service/molecule/mevboost-geth-teku/molecule.yml index 86534ddb2e..9ce9744d0e 100644 --- a/controls/roles/manage-service/molecule/mevboost-geth-teku/molecule.yml +++ b/controls/roles/manage-service/molecule/mevboost-geth-teku/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--mevboost-geth-teku--ubuntu-22.04" + - name: "manage-service--mevboost-geth-teku--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--mevboost-geth-teku--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/mevboost-geth-teku/prepare.yml b/controls/roles/manage-service/molecule/mevboost-geth-teku/prepare.yml index d4fed0fda5..d17b66bd78 100644 --- a/controls/roles/manage-service/molecule/mevboost-geth-teku/prepare.yml +++ b/controls/roles/manage-service/molecule/mevboost-geth-teku/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -18,19 +18,19 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - name: Install keytool for creating Keystore (CentOS 8) raw: yum install -y java-1.8.0-openjdk become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - name: Install pip, expect (CentOS 8) yum: @@ -39,12 +39,11 @@ - expect state: latest become: true - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/mevboost-nethermind-lighthouse/create.yml b/controls/roles/manage-service/molecule/mevboost-nethermind-lighthouse/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/mevboost-nethermind-lighthouse/create.yml +++ b/controls/roles/manage-service/molecule/mevboost-nethermind-lighthouse/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/mevboost-nethermind-lighthouse/destroy.yml b/controls/roles/manage-service/molecule/mevboost-nethermind-lighthouse/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/mevboost-nethermind-lighthouse/destroy.yml +++ b/controls/roles/manage-service/molecule/mevboost-nethermind-lighthouse/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/mevboost-nethermind-lighthouse/molecule.yml b/controls/roles/manage-service/molecule/mevboost-nethermind-lighthouse/molecule.yml index 876d4b4e40..9c6b39e307 100644 --- a/controls/roles/manage-service/molecule/mevboost-nethermind-lighthouse/molecule.yml +++ b/controls/roles/manage-service/molecule/mevboost-nethermind-lighthouse/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--mevboost-nethermind-lighthouse--ubuntu-22.04" + - name: "manage-service--mevboost-nethermind-lighthouse--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--mevboost-nethermind-lighthouse--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/mevboost-nethermind-lighthouse/prepare.yml b/controls/roles/manage-service/molecule/mevboost-nethermind-lighthouse/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/mevboost-nethermind-lighthouse/prepare.yml +++ b/controls/roles/manage-service/molecule/mevboost-nethermind-lighthouse/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/mevboost-nethermind-nimbus/create.yml b/controls/roles/manage-service/molecule/mevboost-nethermind-nimbus/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/mevboost-nethermind-nimbus/create.yml +++ b/controls/roles/manage-service/molecule/mevboost-nethermind-nimbus/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/mevboost-nethermind-nimbus/destroy.yml b/controls/roles/manage-service/molecule/mevboost-nethermind-nimbus/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/mevboost-nethermind-nimbus/destroy.yml +++ b/controls/roles/manage-service/molecule/mevboost-nethermind-nimbus/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/mevboost-nethermind-nimbus/molecule.yml b/controls/roles/manage-service/molecule/mevboost-nethermind-nimbus/molecule.yml index 73a5dd1960..5e133791d3 100644 --- a/controls/roles/manage-service/molecule/mevboost-nethermind-nimbus/molecule.yml +++ b/controls/roles/manage-service/molecule/mevboost-nethermind-nimbus/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--mevboost-nethermind-nimbus--ubuntu-22.04" + - name: "manage-service--mevboost-nethermind-nimbus--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--mevboost-nethermind-nimbus--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/mevboost-nethermind-nimbus/prepare.yml b/controls/roles/manage-service/molecule/mevboost-nethermind-nimbus/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/mevboost-nethermind-nimbus/prepare.yml +++ b/controls/roles/manage-service/molecule/mevboost-nethermind-nimbus/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/mevboost-nethermind-prysm/create.yml b/controls/roles/manage-service/molecule/mevboost-nethermind-prysm/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/mevboost-nethermind-prysm/create.yml +++ b/controls/roles/manage-service/molecule/mevboost-nethermind-prysm/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/mevboost-nethermind-prysm/destroy.yml b/controls/roles/manage-service/molecule/mevboost-nethermind-prysm/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/mevboost-nethermind-prysm/destroy.yml +++ b/controls/roles/manage-service/molecule/mevboost-nethermind-prysm/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/mevboost-nethermind-prysm/molecule.yml b/controls/roles/manage-service/molecule/mevboost-nethermind-prysm/molecule.yml index bb69acce87..5cc72083ca 100644 --- a/controls/roles/manage-service/molecule/mevboost-nethermind-prysm/molecule.yml +++ b/controls/roles/manage-service/molecule/mevboost-nethermind-prysm/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--mevboost-nethermind-prysm--ubuntu-22.04" + - name: "manage-service--mevboost-nethermind-prysm--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--mevboost-nethermind-prysm--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/mevboost-nethermind-prysm/prepare.yml b/controls/roles/manage-service/molecule/mevboost-nethermind-prysm/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/mevboost-nethermind-prysm/prepare.yml +++ b/controls/roles/manage-service/molecule/mevboost-nethermind-prysm/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/mevboost-nethermind-teku/create.yml b/controls/roles/manage-service/molecule/mevboost-nethermind-teku/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/mevboost-nethermind-teku/create.yml +++ b/controls/roles/manage-service/molecule/mevboost-nethermind-teku/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/mevboost-nethermind-teku/destroy.yml b/controls/roles/manage-service/molecule/mevboost-nethermind-teku/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/mevboost-nethermind-teku/destroy.yml +++ b/controls/roles/manage-service/molecule/mevboost-nethermind-teku/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/mevboost-nethermind-teku/molecule.yml b/controls/roles/manage-service/molecule/mevboost-nethermind-teku/molecule.yml index 300bfc29a9..d4c7a2bb23 100644 --- a/controls/roles/manage-service/molecule/mevboost-nethermind-teku/molecule.yml +++ b/controls/roles/manage-service/molecule/mevboost-nethermind-teku/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--mevboost-nethermind-teku--ubuntu-22.04" + - name: "manage-service--mevboost-nethermind-teku--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--mevboost-nethermind-teku--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/mevboost-nethermind-teku/prepare.yml b/controls/roles/manage-service/molecule/mevboost-nethermind-teku/prepare.yml index d4fed0fda5..d17b66bd78 100644 --- a/controls/roles/manage-service/molecule/mevboost-nethermind-teku/prepare.yml +++ b/controls/roles/manage-service/molecule/mevboost-nethermind-teku/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -18,19 +18,19 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - name: Install keytool for creating Keystore (CentOS 8) raw: yum install -y java-1.8.0-openjdk become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - name: Install pip, expect (CentOS 8) yum: @@ -39,12 +39,11 @@ - expect state: latest become: true - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/monitor-besu/create.yml b/controls/roles/manage-service/molecule/monitor-besu/create.yml index c0bccae41e..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/monitor-besu/create.yml +++ b/controls/roles/manage-service/molecule/monitor-besu/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/monitor-besu/destroy.yml b/controls/roles/manage-service/molecule/monitor-besu/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/monitor-besu/destroy.yml +++ b/controls/roles/manage-service/molecule/monitor-besu/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/monitor-besu/molecule.yml b/controls/roles/manage-service/molecule/monitor-besu/molecule.yml index b6672b77be..cc37506d75 100644 --- a/controls/roles/manage-service/molecule/monitor-besu/molecule.yml +++ b/controls/roles/manage-service/molecule/monitor-besu/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--monitor-besu--ubuntu-22.04" + - name: "manage-service--monitor-besu--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil provisioner: name: ansible config_options: diff --git a/controls/roles/manage-service/molecule/monitor-besu/prepare.yml b/controls/roles/manage-service/molecule/monitor-besu/prepare.yml index 15f14e5f53..21d56dd842 100644 --- a/controls/roles/manage-service/molecule/monitor-besu/prepare.yml +++ b/controls/roles/manage-service/molecule/monitor-besu/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml vars: @@ -16,13 +16,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" @@ -32,11 +32,11 @@ # besu - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -75,5 +75,4 @@ user: "2000" volumes: - "/opt/app/services/{{ besu_service }}/data:/opt/app/data" - # EOF diff --git a/controls/roles/manage-service/molecule/monitor-erigon/create.yml b/controls/roles/manage-service/molecule/monitor-erigon/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/monitor-erigon/create.yml +++ b/controls/roles/manage-service/molecule/monitor-erigon/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/monitor-erigon/destroy.yml b/controls/roles/manage-service/molecule/monitor-erigon/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/monitor-erigon/destroy.yml +++ b/controls/roles/manage-service/molecule/monitor-erigon/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/monitor-erigon/molecule.yml b/controls/roles/manage-service/molecule/monitor-erigon/molecule.yml index 50f1e86c37..6d59a8f640 100644 --- a/controls/roles/manage-service/molecule/monitor-erigon/molecule.yml +++ b/controls/roles/manage-service/molecule/monitor-erigon/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--monitor-erigon--ubuntu-22.04" + - name: "manage-service--monitor-erigon--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil provisioner: name: ansible config_options: diff --git a/controls/roles/manage-service/molecule/monitor-erigon/prepare.yml b/controls/roles/manage-service/molecule/monitor-erigon/prepare.yml index e24967313f..92b0e707bb 100644 --- a/controls/roles/manage-service/molecule/monitor-erigon/prepare.yml +++ b/controls/roles/manage-service/molecule/monitor-erigon/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml vars: @@ -16,13 +16,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" @@ -32,11 +32,11 @@ # erigon service - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -67,5 +67,4 @@ user: "2000" volumes: - "/opt/app/services/{{ erigon_service }}/data:/opt/app/data" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/monitor-geth/create.yml b/controls/roles/manage-service/molecule/monitor-geth/create.yml index c0bccae41e..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/monitor-geth/create.yml +++ b/controls/roles/manage-service/molecule/monitor-geth/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/monitor-geth/destroy.yml b/controls/roles/manage-service/molecule/monitor-geth/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/monitor-geth/destroy.yml +++ b/controls/roles/manage-service/molecule/monitor-geth/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/monitor-geth/molecule.yml b/controls/roles/manage-service/molecule/monitor-geth/molecule.yml index 7ac668ed5a..74de258fd1 100644 --- a/controls/roles/manage-service/molecule/monitor-geth/molecule.yml +++ b/controls/roles/manage-service/molecule/monitor-geth/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--monitor-geth--ubuntu-22.04" + - name: "manage-service--monitor-geth--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil provisioner: name: ansible config_options: diff --git a/controls/roles/manage-service/molecule/monitor-geth/prepare.yml b/controls/roles/manage-service/molecule/monitor-geth/prepare.yml index 1019a854b1..f32665cebb 100644 --- a/controls/roles/manage-service/molecule/monitor-geth/prepare.yml +++ b/controls/roles/manage-service/molecule/monitor-geth/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml vars: @@ -16,13 +16,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" @@ -31,11 +31,11 @@ name: "configure-firewall" - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -60,5 +60,4 @@ user: "2000" volumes: - "/opt/app/services/{{ geth_service }}/data:/opt/app/geth" - # EOF diff --git a/controls/roles/manage-service/molecule/monitor-lighthouse/create.yml b/controls/roles/manage-service/molecule/monitor-lighthouse/create.yml index c0bccae41e..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/monitor-lighthouse/create.yml +++ b/controls/roles/manage-service/molecule/monitor-lighthouse/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/monitor-lighthouse/destroy.yml b/controls/roles/manage-service/molecule/monitor-lighthouse/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/monitor-lighthouse/destroy.yml +++ b/controls/roles/manage-service/molecule/monitor-lighthouse/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/monitor-lighthouse/molecule.yml b/controls/roles/manage-service/molecule/monitor-lighthouse/molecule.yml index 21d1194a81..c87e18cf85 100644 --- a/controls/roles/manage-service/molecule/monitor-lighthouse/molecule.yml +++ b/controls/roles/manage-service/molecule/monitor-lighthouse/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--monitor-lighthouse--ubuntu-22.04" + - name: "manage-service--monitor-lighthouse--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--monitor-lighthouse--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/monitor-lighthouse/prepare.yml b/controls/roles/manage-service/molecule/monitor-lighthouse/prepare.yml index b97172108a..cb48801bf5 100644 --- a/controls/roles/manage-service/molecule/monitor-lighthouse/prepare.yml +++ b/controls/roles/manage-service/molecule/monitor-lighthouse/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml vars: @@ -16,13 +16,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" @@ -32,11 +32,11 @@ # lh beacon service - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: diff --git a/controls/roles/manage-service/molecule/monitor-lodestar/create.yml b/controls/roles/manage-service/molecule/monitor-lodestar/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/monitor-lodestar/create.yml +++ b/controls/roles/manage-service/molecule/monitor-lodestar/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/monitor-lodestar/destroy.yml b/controls/roles/manage-service/molecule/monitor-lodestar/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/monitor-lodestar/destroy.yml +++ b/controls/roles/manage-service/molecule/monitor-lodestar/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/monitor-lodestar/molecule.yml b/controls/roles/manage-service/molecule/monitor-lodestar/molecule.yml index 2c7bd199e7..b8277ef75e 100644 --- a/controls/roles/manage-service/molecule/monitor-lodestar/molecule.yml +++ b/controls/roles/manage-service/molecule/monitor-lodestar/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--monitor-lodestar--ubuntu-22.04" + - name: "manage-service--monitor-lodestar--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--monitor-lodestar--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/monitor-lodestar/prepare.yml b/controls/roles/manage-service/molecule/monitor-lodestar/prepare.yml index 17a1c32405..3c92749a37 100644 --- a/controls/roles/manage-service/molecule/monitor-lodestar/prepare.yml +++ b/controls/roles/manage-service/molecule/monitor-lodestar/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml vars: @@ -16,13 +16,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" @@ -30,13 +30,13 @@ - include_role: name: "configure-firewall" - # lodestar beacon service + # lodestar beacon service - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -63,4 +63,4 @@ - --metrics.address=0.0.0.0 user: "2000" volumes: - - "/opt/app/services/{{ beacon_service }}/lodestar/beacon:/opt/app/beacon" \ No newline at end of file + - "/opt/app/services/{{ beacon_service }}/lodestar/beacon:/opt/app/beacon" diff --git a/controls/roles/manage-service/molecule/monitor-nethermind/create.yml b/controls/roles/manage-service/molecule/monitor-nethermind/create.yml index c0bccae41e..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/monitor-nethermind/create.yml +++ b/controls/roles/manage-service/molecule/monitor-nethermind/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/monitor-nethermind/destroy.yml b/controls/roles/manage-service/molecule/monitor-nethermind/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/monitor-nethermind/destroy.yml +++ b/controls/roles/manage-service/molecule/monitor-nethermind/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/monitor-nethermind/molecule.yml b/controls/roles/manage-service/molecule/monitor-nethermind/molecule.yml index 4edf1097a1..d5cefc23de 100644 --- a/controls/roles/manage-service/molecule/monitor-nethermind/molecule.yml +++ b/controls/roles/manage-service/molecule/monitor-nethermind/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--monitor-nethermind--ubuntu-22.04" + - name: "manage-service--monitor-nethermind--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil provisioner: name: ansible config_options: diff --git a/controls/roles/manage-service/molecule/monitor-nethermind/prepare.yml b/controls/roles/manage-service/molecule/monitor-nethermind/prepare.yml index ac49243741..8c0bcb9a09 100644 --- a/controls/roles/manage-service/molecule/monitor-nethermind/prepare.yml +++ b/controls/roles/manage-service/molecule/monitor-nethermind/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml vars: @@ -16,13 +16,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" @@ -32,11 +32,11 @@ # nethermind - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -52,20 +52,19 @@ entrypoint: ["./nethermind"] env: {} command: - - --config=goerli - - --log=debug - - --datadir=/opt/app/data - - --Network.DiscoveryPort=30303 - - --Network.P2PPort=30303 - - --JsonRpc.Enabled=true - - --JsonRpc.Host=0.0.0.0 - - --Init.WebSocketsEnabled=true - - --JsonRpc.WebSocketsPort=8546 - - --JsonRpc.EnabledModules=[web3,eth,subscribe,net] - - --Metrics.Enabled=true - - --Metrics.ExposePort=6060 + - --config=goerli + - --log=debug + - --datadir=/opt/app/data + - --Network.DiscoveryPort=30303 + - --Network.P2PPort=30303 + - --JsonRpc.Enabled=true + - --JsonRpc.Host=0.0.0.0 + - --Init.WebSocketsEnabled=true + - --JsonRpc.WebSocketsPort=8546 + - --JsonRpc.EnabledModules=[web3,eth,subscribe,net] + - --Metrics.Enabled=true + - --Metrics.ExposePort=6060 user: "root" volumes: - "/opt/app/services/{{ nethermind_service }}/data:/opt/app/data" - # EOF diff --git a/controls/roles/manage-service/molecule/monitor-nimbus/create.yml b/controls/roles/manage-service/molecule/monitor-nimbus/create.yml index c0bccae41e..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/monitor-nimbus/create.yml +++ b/controls/roles/manage-service/molecule/monitor-nimbus/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/monitor-nimbus/destroy.yml b/controls/roles/manage-service/molecule/monitor-nimbus/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/monitor-nimbus/destroy.yml +++ b/controls/roles/manage-service/molecule/monitor-nimbus/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/monitor-nimbus/molecule.yml b/controls/roles/manage-service/molecule/monitor-nimbus/molecule.yml index 480bf14cab..de4d669ce0 100644 --- a/controls/roles/manage-service/molecule/monitor-nimbus/molecule.yml +++ b/controls/roles/manage-service/molecule/monitor-nimbus/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--monitor-nimbus--ubuntu-22.04" + - name: "manage-service--monitor-nimbus--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--monitor-nimbus--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/monitor-nimbus/prepare.yml b/controls/roles/manage-service/molecule/monitor-nimbus/prepare.yml index 4c4ec455a7..5afc8c2785 100644 --- a/controls/roles/manage-service/molecule/monitor-nimbus/prepare.yml +++ b/controls/roles/manage-service/molecule/monitor-nimbus/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml vars: @@ -16,13 +16,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" @@ -32,11 +32,11 @@ # nimbus beacon service - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: diff --git a/controls/roles/manage-service/molecule/monitor-prysm/create.yml b/controls/roles/manage-service/molecule/monitor-prysm/create.yml index c0bccae41e..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/monitor-prysm/create.yml +++ b/controls/roles/manage-service/molecule/monitor-prysm/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/monitor-prysm/destroy.yml b/controls/roles/manage-service/molecule/monitor-prysm/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/monitor-prysm/destroy.yml +++ b/controls/roles/manage-service/molecule/monitor-prysm/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/monitor-prysm/molecule.yml b/controls/roles/manage-service/molecule/monitor-prysm/molecule.yml index 97e5961e71..a8b7b25f9a 100644 --- a/controls/roles/manage-service/molecule/monitor-prysm/molecule.yml +++ b/controls/roles/manage-service/molecule/monitor-prysm/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--monitor-prysm--ubuntu-22.04" + - name: "manage-service--monitor-prysm--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--monitor-prysm--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/monitor-prysm/prepare.yml b/controls/roles/manage-service/molecule/monitor-prysm/prepare.yml index d4ee4a7a1e..d1f26c4818 100644 --- a/controls/roles/manage-service/molecule/monitor-prysm/prepare.yml +++ b/controls/roles/manage-service/molecule/monitor-prysm/prepare.yml @@ -16,13 +16,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" diff --git a/controls/roles/manage-service/molecule/monitor-ssvnetwork/create.yml b/controls/roles/manage-service/molecule/monitor-ssvnetwork/create.yml index c0bccae41e..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/monitor-ssvnetwork/create.yml +++ b/controls/roles/manage-service/molecule/monitor-ssvnetwork/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/monitor-ssvnetwork/destroy.yml b/controls/roles/manage-service/molecule/monitor-ssvnetwork/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/monitor-ssvnetwork/destroy.yml +++ b/controls/roles/manage-service/molecule/monitor-ssvnetwork/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/monitor-ssvnetwork/molecule.yml b/controls/roles/manage-service/molecule/monitor-ssvnetwork/molecule.yml index 44bbabcff7..3c57540f47 100644 --- a/controls/roles/manage-service/molecule/monitor-ssvnetwork/molecule.yml +++ b/controls/roles/manage-service/molecule/monitor-ssvnetwork/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--monitor-ssvnet--ubuntu-22.04" + - name: "manage-service--monitor-ssvnet--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil provisioner: name: ansible config_options: diff --git a/controls/roles/manage-service/molecule/monitor-ssvnetwork/prepare.yml b/controls/roles/manage-service/molecule/monitor-ssvnetwork/prepare.yml index 7969e5b60a..af2069e395 100644 --- a/controls/roles/manage-service/molecule/monitor-ssvnetwork/prepare.yml +++ b/controls/roles/manage-service/molecule/monitor-ssvnetwork/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml vars: @@ -18,13 +18,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" @@ -33,11 +33,11 @@ name: "configure-firewall" - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -74,11 +74,11 @@ - "/opt/app/services/{{ geth_service }}/engine.jwt:/engine.jwt" - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -119,9 +119,9 @@ # ssv operator keys - block: - - name: "Include ssv-key-generator" - include_role: - name: "ssv-key-generator" + - name: "Include ssv-key-generator" + include_role: + name: "ssv-key-generator" vars: ssv_key_service: "{{ ssv_service }}" @@ -141,7 +141,7 @@ state: directory owner: "2000" group: "2000" - mode: '0744' + mode: "0744" become: yes - name: Write SSV-Service's config @@ -159,16 +159,16 @@ MetricsAPIPort: 15000 owner: "2000" group: "2000" - mode: '0644' + mode: "0644" become: yes # ssv service - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -184,10 +184,9 @@ env: CONFIG_PATH: /data/config.yaml command: bash -c "make BUILD_PATH=/go/bin/ssvnode start-node && - docker logs ssv_node" + docker logs ssv_node" entrypoint: [] user: "2000" volumes: - "/opt/app/services/{{ ssv_service }}/data:/data" - # EOF diff --git a/controls/roles/manage-service/molecule/monitor-teku/create.yml b/controls/roles/manage-service/molecule/monitor-teku/create.yml index c0bccae41e..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/monitor-teku/create.yml +++ b/controls/roles/manage-service/molecule/monitor-teku/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/monitor-teku/destroy.yml b/controls/roles/manage-service/molecule/monitor-teku/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/monitor-teku/destroy.yml +++ b/controls/roles/manage-service/molecule/monitor-teku/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/monitor-teku/molecule.yml b/controls/roles/manage-service/molecule/monitor-teku/molecule.yml index dffe4cc4a0..f8c2e6b5ea 100644 --- a/controls/roles/manage-service/molecule/monitor-teku/molecule.yml +++ b/controls/roles/manage-service/molecule/monitor-teku/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--monitor-teku--ubuntu-22.04" + - name: "manage-service--monitor-teku--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--monitor-teku--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/monitor-teku/prepare.yml b/controls/roles/manage-service/molecule/monitor-teku/prepare.yml index 048393dce0..a16861b076 100644 --- a/controls/roles/manage-service/molecule/monitor-teku/prepare.yml +++ b/controls/roles/manage-service/molecule/monitor-teku/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml vars: @@ -16,13 +16,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" @@ -32,11 +32,11 @@ # teku beacon service - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: diff --git a/controls/roles/manage-service/molecule/nethermind-lighthouse/create.yml b/controls/roles/manage-service/molecule/nethermind-lighthouse/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/nethermind-lighthouse/create.yml +++ b/controls/roles/manage-service/molecule/nethermind-lighthouse/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/nethermind-lighthouse/destroy.yml b/controls/roles/manage-service/molecule/nethermind-lighthouse/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/nethermind-lighthouse/destroy.yml +++ b/controls/roles/manage-service/molecule/nethermind-lighthouse/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/nethermind-lighthouse/molecule.yml b/controls/roles/manage-service/molecule/nethermind-lighthouse/molecule.yml index 7cf4c2a4a6..19221f5b09 100644 --- a/controls/roles/manage-service/molecule/nethermind-lighthouse/molecule.yml +++ b/controls/roles/manage-service/molecule/nethermind-lighthouse/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--nethermind-lighthouse--ubuntu-22.04" + - name: "manage-service--nethermind-lighthouse--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--nethermind-lighthouse--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/nethermind-lighthouse/prepare.yml b/controls/roles/manage-service/molecule/nethermind-lighthouse/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/nethermind-lighthouse/prepare.yml +++ b/controls/roles/manage-service/molecule/nethermind-lighthouse/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/nethermind-nimbus/create.yml b/controls/roles/manage-service/molecule/nethermind-nimbus/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/nethermind-nimbus/create.yml +++ b/controls/roles/manage-service/molecule/nethermind-nimbus/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/nethermind-nimbus/destroy.yml b/controls/roles/manage-service/molecule/nethermind-nimbus/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/nethermind-nimbus/destroy.yml +++ b/controls/roles/manage-service/molecule/nethermind-nimbus/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/nethermind-nimbus/molecule.yml b/controls/roles/manage-service/molecule/nethermind-nimbus/molecule.yml index e58e9cf012..956335feb7 100644 --- a/controls/roles/manage-service/molecule/nethermind-nimbus/molecule.yml +++ b/controls/roles/manage-service/molecule/nethermind-nimbus/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--nethermind-nimbus--ubuntu-22.04" + - name: "manage-service--nethermind-nimbus--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--nethermind-nimbus--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/nethermind-nimbus/prepare.yml b/controls/roles/manage-service/molecule/nethermind-nimbus/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/nethermind-nimbus/prepare.yml +++ b/controls/roles/manage-service/molecule/nethermind-nimbus/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/nethermind-prysm/create.yml b/controls/roles/manage-service/molecule/nethermind-prysm/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/nethermind-prysm/create.yml +++ b/controls/roles/manage-service/molecule/nethermind-prysm/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/nethermind-prysm/destroy.yml b/controls/roles/manage-service/molecule/nethermind-prysm/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/nethermind-prysm/destroy.yml +++ b/controls/roles/manage-service/molecule/nethermind-prysm/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/nethermind-prysm/molecule.yml b/controls/roles/manage-service/molecule/nethermind-prysm/molecule.yml index 87770f9f30..6b488d62ae 100644 --- a/controls/roles/manage-service/molecule/nethermind-prysm/molecule.yml +++ b/controls/roles/manage-service/molecule/nethermind-prysm/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--nethermind-teku--ubuntu-22.04" + - name: "manage-service--nethermind-teku--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--nethermind-teku--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/nethermind-prysm/prepare.yml b/controls/roles/manage-service/molecule/nethermind-prysm/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/nethermind-prysm/prepare.yml +++ b/controls/roles/manage-service/molecule/nethermind-prysm/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/nethermind-teku-gnosis/create.yml b/controls/roles/manage-service/molecule/nethermind-teku-gnosis/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/nethermind-teku-gnosis/create.yml +++ b/controls/roles/manage-service/molecule/nethermind-teku-gnosis/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/nethermind-teku-gnosis/destroy.yml b/controls/roles/manage-service/molecule/nethermind-teku-gnosis/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/nethermind-teku-gnosis/destroy.yml +++ b/controls/roles/manage-service/molecule/nethermind-teku-gnosis/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/nethermind-teku-gnosis/molecule.yml b/controls/roles/manage-service/molecule/nethermind-teku-gnosis/molecule.yml index ce2d12d72f..97478954b9 100644 --- a/controls/roles/manage-service/molecule/nethermind-teku-gnosis/molecule.yml +++ b/controls/roles/manage-service/molecule/nethermind-teku-gnosis/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--nethermind-teku-gnosis--ubuntu-22.04" + - name: "manage-service--nethermind-teku-gnosis--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--nethermind-teku-gnosis--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/nethermind-teku-gnosis/prepare.yml b/controls/roles/manage-service/molecule/nethermind-teku-gnosis/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/nethermind-teku-gnosis/prepare.yml +++ b/controls/roles/manage-service/molecule/nethermind-teku-gnosis/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/nethermind-teku/create.yml b/controls/roles/manage-service/molecule/nethermind-teku/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/nethermind-teku/create.yml +++ b/controls/roles/manage-service/molecule/nethermind-teku/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/nethermind-teku/destroy.yml b/controls/roles/manage-service/molecule/nethermind-teku/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/nethermind-teku/destroy.yml +++ b/controls/roles/manage-service/molecule/nethermind-teku/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/nethermind-teku/molecule.yml b/controls/roles/manage-service/molecule/nethermind-teku/molecule.yml index 87770f9f30..6b488d62ae 100644 --- a/controls/roles/manage-service/molecule/nethermind-teku/molecule.yml +++ b/controls/roles/manage-service/molecule/nethermind-teku/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--nethermind-teku--ubuntu-22.04" + - name: "manage-service--nethermind-teku--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--nethermind-teku--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/nethermind-teku/prepare.yml b/controls/roles/manage-service/molecule/nethermind-teku/prepare.yml index 1473c60cd2..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/nethermind-teku/prepare.yml +++ b/controls/roles/manage-service/molecule/nethermind-teku/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - -# EOF \ No newline at end of file +# EOF diff --git a/controls/roles/manage-service/molecule/nimbus-checkpoint-sync/create.yml b/controls/roles/manage-service/molecule/nimbus-checkpoint-sync/create.yml index c1161312d5..aa9ee44702 100644 --- a/controls/roles/manage-service/molecule/nimbus-checkpoint-sync/create.yml +++ b/controls/roles/manage-service/molecule/nimbus-checkpoint-sync/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -93,5 +95,4 @@ search_regex: SSH delay: 10 with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" - #EOF diff --git a/controls/roles/manage-service/molecule/nimbus-checkpoint-sync/destroy.yml b/controls/roles/manage-service/molecule/nimbus-checkpoint-sync/destroy.yml index 215639378d..8a0d5947ae 100644 --- a/controls/roles/manage-service/molecule/nimbus-checkpoint-sync/destroy.yml +++ b/controls/roles/manage-service/molecule/nimbus-checkpoint-sync/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -53,5 +59,4 @@ content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" when: server.changed | bool - #EOF diff --git a/controls/roles/manage-service/molecule/nimbus-checkpoint-sync/molecule.yml b/controls/roles/manage-service/molecule/nimbus-checkpoint-sync/molecule.yml index a37bad432d..65cbb8505f 100644 --- a/controls/roles/manage-service/molecule/nimbus-checkpoint-sync/molecule.yml +++ b/controls/roles/manage-service/molecule/nimbus-checkpoint-sync/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--nimbus-checkpointsync--ubuntu-22.04" + - name: "manage-service--nimbus-checkpointsync--ubuntu-24.04" hostname: ubuntu server_type: cpx21 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "nimbus-checkpointsync--default--centos-stream-8" # hostname: "centos" # server_type: cpx21 diff --git a/controls/roles/manage-service/molecule/nimbus-checkpoint-sync/prepare.yml b/controls/roles/manage-service/molecule/nimbus-checkpoint-sync/prepare.yml index 9e1a9a41ed..34bf1b5484 100644 --- a/controls/roles/manage-service/molecule/nimbus-checkpoint-sync/prepare.yml +++ b/controls/roles/manage-service/molecule/nimbus-checkpoint-sync/prepare.yml @@ -11,13 +11,13 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" diff --git a/controls/roles/manage-service/molecule/ssv-lighthouse/create.yml b/controls/roles/manage-service/molecule/ssv-lighthouse/create.yml index c0bccae41e..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/ssv-lighthouse/create.yml +++ b/controls/roles/manage-service/molecule/ssv-lighthouse/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/ssv-lighthouse/destroy.yml b/controls/roles/manage-service/molecule/ssv-lighthouse/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/ssv-lighthouse/destroy.yml +++ b/controls/roles/manage-service/molecule/ssv-lighthouse/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/ssv-lighthouse/molecule.yml b/controls/roles/manage-service/molecule/ssv-lighthouse/molecule.yml index 163bf08a11..8fe646b5f6 100644 --- a/controls/roles/manage-service/molecule/ssv-lighthouse/molecule.yml +++ b/controls/roles/manage-service/molecule/ssv-lighthouse/molecule.yml @@ -4,13 +4,14 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--ssv-lighthouse--ubuntu-22.04" + - name: "manage-service--ssv-lighthouse--ubuntu-24.04" hostname: ubuntu - server_type: cx42 - image: ubuntu-22.04 + server_type: cpx31 + image: ubuntu-24.04 + location: hil # - name: "manage-service--ssv-lighthouse--centos-stream-8" # hostname: "centos" -# server_type: cx42 +# server_type: cpx31 # image: centos-stream-8 provisioner: name: ansible diff --git a/controls/roles/manage-service/molecule/ssv-lighthouse/prepare.yml b/controls/roles/manage-service/molecule/ssv-lighthouse/prepare.yml index f2aa473839..a9c849dd25 100644 --- a/controls/roles/manage-service/molecule/ssv-lighthouse/prepare.yml +++ b/controls/roles/manage-service/molecule/ssv-lighthouse/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml vars: @@ -27,13 +27,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" @@ -60,11 +60,11 @@ become: yes - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -101,11 +101,11 @@ - "/opt/app/services/{{ geth_service }}/engine.jwt:/engine.jwt" - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: diff --git a/controls/roles/manage-service/molecule/ssv-lodestar/create.yml b/controls/roles/manage-service/molecule/ssv-lodestar/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/ssv-lodestar/create.yml +++ b/controls/roles/manage-service/molecule/ssv-lodestar/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/manage-service/molecule/ssv-lodestar/destroy.yml b/controls/roles/manage-service/molecule/ssv-lodestar/destroy.yml index 0168cc5a01..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/ssv-lodestar/destroy.yml +++ b/controls/roles/manage-service/molecule/ssv-lodestar/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/ssv-lodestar/molecule.yml b/controls/roles/manage-service/molecule/ssv-lodestar/molecule.yml index 80590e843d..ffbfdd84a5 100644 --- a/controls/roles/manage-service/molecule/ssv-lodestar/molecule.yml +++ b/controls/roles/manage-service/molecule/ssv-lodestar/molecule.yml @@ -4,13 +4,14 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--ssv-lodestar--ubuntu-22.04" + - name: "manage-service--ssv-lodestar--ubuntu-24.04" hostname: ubuntu - server_type: cx42 - image: ubuntu-22.04 + server_type: cpx31 + image: ubuntu-24.04 + location: hil # - name: "manage-service--ssv-lodestar--centos-stream-8" # hostname: "centos" -# server_type: cx42 +# server_type: cpx31 # image: centos-stream-8 provisioner: name: ansible diff --git a/controls/roles/manage-service/molecule/ssv-lodestar/prepare.yml b/controls/roles/manage-service/molecule/ssv-lodestar/prepare.yml index 79bbc79e40..fa3e20ab46 100644 --- a/controls/roles/manage-service/molecule/ssv-lodestar/prepare.yml +++ b/controls/roles/manage-service/molecule/ssv-lodestar/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml vars: @@ -27,13 +27,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" @@ -61,11 +61,11 @@ # geth service - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -103,11 +103,11 @@ # lodestar beacon service - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -134,4 +134,4 @@ user: "2000" volumes: - "/opt/app/services/{{ beacon_service }}/lodestar/beacon:/opt/app/beacon" - - "/opt/app/services/{{ geth_service }}/engine.jwt:/engine.jwt" \ No newline at end of file + - "/opt/app/services/{{ geth_service }}/engine.jwt:/engine.jwt" diff --git a/controls/roles/manage-service/molecule/ssv-nimbus/create.yml b/controls/roles/manage-service/molecule/ssv-nimbus/create.yml index 68ba4305c2..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/ssv-nimbus/create.yml +++ b/controls/roles/manage-service/molecule/ssv-nimbus/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,14 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", - } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/ssv-nimbus/destroy.yml b/controls/roles/manage-service/molecule/ssv-nimbus/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/ssv-nimbus/destroy.yml +++ b/controls/roles/manage-service/molecule/ssv-nimbus/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/ssv-nimbus/molecule.yml b/controls/roles/manage-service/molecule/ssv-nimbus/molecule.yml index 35dd605cd2..664c87fe75 100644 --- a/controls/roles/manage-service/molecule/ssv-nimbus/molecule.yml +++ b/controls/roles/manage-service/molecule/ssv-nimbus/molecule.yml @@ -4,13 +4,14 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--ssv-nimbus--ubuntu-22.04" + - name: "manage-service--ssv-nimbus--ubuntu-24.04" hostname: ubuntu - server_type: cx42 - image: ubuntu-22.04 + server_type: cpx31 + image: ubuntu-24.04 + location: hil # - name: "manage-service--ssv-nimbus--centos-stream-8" # hostname: "centos" -# server_type: cx42 +# server_type: cpx31 # image: centos-stream-8 provisioner: name: ansible diff --git a/controls/roles/manage-service/molecule/ssv-nimbus/prepare.yml b/controls/roles/manage-service/molecule/ssv-nimbus/prepare.yml index 99309f3733..0eca15e7ac 100644 --- a/controls/roles/manage-service/molecule/ssv-nimbus/prepare.yml +++ b/controls/roles/manage-service/molecule/ssv-nimbus/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml vars: @@ -28,13 +28,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" @@ -61,11 +61,11 @@ become: yes - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -103,11 +103,11 @@ # nimbus beacon & validator service - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: diff --git a/controls/roles/manage-service/molecule/ssv-prysm/create.yml b/controls/roles/manage-service/molecule/ssv-prysm/create.yml index c0bccae41e..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/ssv-prysm/create.yml +++ b/controls/roles/manage-service/molecule/ssv-prysm/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/ssv-prysm/destroy.yml b/controls/roles/manage-service/molecule/ssv-prysm/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/ssv-prysm/destroy.yml +++ b/controls/roles/manage-service/molecule/ssv-prysm/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/ssv-prysm/molecule.yml b/controls/roles/manage-service/molecule/ssv-prysm/molecule.yml index b86d0bbd92..f820f58745 100644 --- a/controls/roles/manage-service/molecule/ssv-prysm/molecule.yml +++ b/controls/roles/manage-service/molecule/ssv-prysm/molecule.yml @@ -4,13 +4,14 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--ssv-prysm--ubuntu-22.04" + - name: "manage-service--ssv-prysm--ubuntu-24.04" hostname: ubuntu - server_type: cx42 - image: ubuntu-22.04 + server_type: cpx31 + image: ubuntu-24.04 + location: hil # - name: "manage-service--ssv-prysm--centos-stream-8" # hostname: "centos" -# server_type: cx42 +# server_type: cpx31 # image: centos-stream-8 provisioner: name: ansible diff --git a/controls/roles/manage-service/molecule/ssv-prysm/prepare.yml b/controls/roles/manage-service/molecule/ssv-prysm/prepare.yml index 11703ae850..bbd64e8e8c 100644 --- a/controls/roles/manage-service/molecule/ssv-prysm/prepare.yml +++ b/controls/roles/manage-service/molecule/ssv-prysm/prepare.yml @@ -28,13 +28,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" diff --git a/controls/roles/manage-service/molecule/ssv-teku/create.yml b/controls/roles/manage-service/molecule/ssv-teku/create.yml index c0bccae41e..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/ssv-teku/create.yml +++ b/controls/roles/manage-service/molecule/ssv-teku/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/ssv-teku/destroy.yml b/controls/roles/manage-service/molecule/ssv-teku/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/ssv-teku/destroy.yml +++ b/controls/roles/manage-service/molecule/ssv-teku/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/ssv-teku/molecule.yml b/controls/roles/manage-service/molecule/ssv-teku/molecule.yml index a4890112ca..4aea20c362 100644 --- a/controls/roles/manage-service/molecule/ssv-teku/molecule.yml +++ b/controls/roles/manage-service/molecule/ssv-teku/molecule.yml @@ -4,13 +4,14 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--ssv-teku--ubuntu-22.04" + - name: "manage-service--ssv-teku--ubuntu-24.04" hostname: ubuntu - server_type: cx42 - image: ubuntu-22.04 + server_type: cpx31 + image: ubuntu-24.04 + location: hil # - name: "manage-service--ssv-teku--centos-stream-8" # hostname: "centos" -# server_type: cx42 +# server_type: cpx31 # image: centos-stream-8 provisioner: name: ansible diff --git a/controls/roles/manage-service/molecule/ssv-teku/prepare.yml b/controls/roles/manage-service/molecule/ssv-teku/prepare.yml index a2c4e4d107..b29547776c 100644 --- a/controls/roles/manage-service/molecule/ssv-teku/prepare.yml +++ b/controls/roles/manage-service/molecule/ssv-teku/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml vars: @@ -28,13 +28,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" @@ -61,11 +61,11 @@ become: yes - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -103,11 +103,11 @@ # teku beacon service - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: diff --git a/controls/roles/manage-service/molecule/start-multiple/create.yml b/controls/roles/manage-service/molecule/start-multiple/create.yml index b39bd9e1a1..461494c9a4 100644 --- a/controls/roles/manage-service/molecule/start-multiple/create.yml +++ b/controls/roles/manage-service/molecule/start-multiple/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -54,13 +54,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/start-multiple/destroy.yml b/controls/roles/manage-service/molecule/start-multiple/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/start-multiple/destroy.yml +++ b/controls/roles/manage-service/molecule/start-multiple/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/start-multiple/molecule.yml b/controls/roles/manage-service/molecule/start-multiple/molecule.yml index 7be9a5880b..aa97a269f9 100644 --- a/controls/roles/manage-service/molecule/start-multiple/molecule.yml +++ b/controls/roles/manage-service/molecule/start-multiple/molecule.yml @@ -4,9 +4,10 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--start-multiple--ubuntu-22.04" + - name: "manage-service--start-multiple--ubuntu-24.04" server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--start-multiple--centos-stream-8" # server_type: cpx31 # image: centos-stream-8 diff --git a/controls/roles/manage-service/molecule/start-multiple/prepare.yml b/controls/roles/manage-service/molecule/start-multiple/prepare.yml index 318cb216ee..e201065250 100644 --- a/controls/roles/manage-service/molecule/start-multiple/prepare.yml +++ b/controls/roles/manage-service/molecule/start-multiple/prepare.yml @@ -17,13 +17,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" diff --git a/controls/roles/manage-service/molecule/start-multiple/verify.yml b/controls/roles/manage-service/molecule/start-multiple/verify.yml index de499b1fa5..3c85848172 100644 --- a/controls/roles/manage-service/molecule/start-multiple/verify.yml +++ b/controls/roles/manage-service/molecule/start-multiple/verify.yml @@ -2,33 +2,33 @@ - name: Verify hosts: all tasks: - - stat: path=/etc/stereum/services - register: stereum_services_dir - - debug: - msg: "{{ stereum_services_dir }}" - - shell: docker ps - register: stereum_docker_ps - - debug: - msg: "{{ stereum_docker_ps }}" - - assert: - that: - - stereum_docker_ps.stdout.find("sigp/lighthouse") != -1 - - stereum_docker_ps.stdout.find("9000->9000") != -1 - - shell: ufw status - register: stereum_ufw_status - - debug: - msg: "{{ stereum_ufw_status }}" - - assert: - that: - - stereum_ufw_status.stdout.find("9000/tcp") != -1 - - stereum_ufw_status.stdout.find("9000/udp") != -1 - - stereum_ufw_status.stdout.find("30303/tcp") != -1 - - stereum_ufw_status.stdout.find("30303/udp") != -1 - - assert: - that: - - stereum_ufw_status.stdout | regex_findall("ALLOW") | length == 11 - when: ansible_distribution == "Ubuntu" - - assert: - that: - - stereum_ufw_status.stdout | regex_findall("ALLOW") | length == 15 - when: ansible_distribution == "CentOS" + - stat: path=/etc/stereum/services + register: stereum_services_dir + - debug: + msg: "{{ stereum_services_dir }}" + - shell: docker ps + register: stereum_docker_ps + - debug: + msg: "{{ stereum_docker_ps }}" + - assert: + that: + - stereum_docker_ps.stdout.find("sigp/lighthouse") != -1 + - stereum_docker_ps.stdout.find("9000->9000") != -1 + - shell: ufw status + register: stereum_ufw_status + - debug: + msg: "{{ stereum_ufw_status }}" + - assert: + that: + - stereum_ufw_status.stdout.find("9000/tcp") != -1 + - stereum_ufw_status.stdout.find("9000/udp") != -1 + - stereum_ufw_status.stdout.find("30303/tcp") != -1 + - stereum_ufw_status.stdout.find("30303/udp") != -1 + - assert: + that: + - stereum_ufw_status.stdout | regex_findall("ALLOW") | length == 11 + when: ansible_facts['distribution'] == "Ubuntu" + - assert: + that: + - stereum_ufw_status.stdout | regex_findall("ALLOW") | length == 15 + when: ansible_facts['distribution'] == "CentOS" diff --git a/controls/roles/manage-service/molecule/start-stop/create.yml b/controls/roles/manage-service/molecule/start-stop/create.yml index b39bd9e1a1..461494c9a4 100644 --- a/controls/roles/manage-service/molecule/start-stop/create.yml +++ b/controls/roles/manage-service/molecule/start-stop/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -54,13 +54,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/start-stop/destroy.yml b/controls/roles/manage-service/molecule/start-stop/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/start-stop/destroy.yml +++ b/controls/roles/manage-service/molecule/start-stop/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/start-stop/molecule.yml b/controls/roles/manage-service/molecule/start-stop/molecule.yml index 4a50e41db7..3b2c764521 100644 --- a/controls/roles/manage-service/molecule/start-stop/molecule.yml +++ b/controls/roles/manage-service/molecule/start-stop/molecule.yml @@ -4,11 +4,12 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--start-stop--ubuntu-22.04" + - name: "manage-service--start-stop--ubuntu-24.04" server_type: cpx21 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "role-manage-service-centos-7" - # server_type: cx22 + # server_type: cpx11 # image: centos-7 provisioner: name: ansible diff --git a/controls/roles/manage-service/molecule/start-stop/prepare.yml b/controls/roles/manage-service/molecule/start-stop/prepare.yml index 62aa449879..7879de9c5e 100644 --- a/controls/roles/manage-service/molecule/start-stop/prepare.yml +++ b/controls/roles/manage-service/molecule/start-stop/prepare.yml @@ -16,13 +16,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" diff --git a/controls/roles/manage-service/molecule/start/create.yml b/controls/roles/manage-service/molecule/start/create.yml index b39bd9e1a1..461494c9a4 100644 --- a/controls/roles/manage-service/molecule/start/create.yml +++ b/controls/roles/manage-service/molecule/start/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -54,13 +54,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/start/destroy.yml b/controls/roles/manage-service/molecule/start/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/start/destroy.yml +++ b/controls/roles/manage-service/molecule/start/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/start/molecule.yml b/controls/roles/manage-service/molecule/start/molecule.yml index e8bf99c2d0..ccf833ae4e 100644 --- a/controls/roles/manage-service/molecule/start/molecule.yml +++ b/controls/roles/manage-service/molecule/start/molecule.yml @@ -4,11 +4,12 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--start--ubuntu-22.04" + - name: "manage-service--start--ubuntu-24.04" server_type: cpx21 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "role-manage-service-centos-7" - # server_type: cx22 + # server_type: cpx11 # image: centos-7 provisioner: name: ansible diff --git a/controls/roles/manage-service/molecule/start/prepare.yml b/controls/roles/manage-service/molecule/start/prepare.yml index f7f50b7260..ff2ebd60e7 100644 --- a/controls/roles/manage-service/molecule/start/prepare.yml +++ b/controls/roles/manage-service/molecule/start/prepare.yml @@ -16,13 +16,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" diff --git a/controls/roles/manage-service/molecule/teku-geth/create.yml b/controls/roles/manage-service/molecule/teku-geth/create.yml index c0bccae41e..48363a32b6 100644 --- a/controls/roles/manage-service/molecule/teku-geth/create.yml +++ b/controls/roles/manage-service/molecule/teku-geth/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/teku-geth/destroy.yml b/controls/roles/manage-service/molecule/teku-geth/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/teku-geth/destroy.yml +++ b/controls/roles/manage-service/molecule/teku-geth/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/teku-geth/molecule.yml b/controls/roles/manage-service/molecule/teku-geth/molecule.yml index 97b14fa102..6ec13702a4 100644 --- a/controls/roles/manage-service/molecule/teku-geth/molecule.yml +++ b/controls/roles/manage-service/molecule/teku-geth/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--teku-geth--ubuntu-22.04" + - name: "manage-service--teku-geth--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "manage-service--teku-geth--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/manage-service/molecule/teku-geth/prepare.yml b/controls/roles/manage-service/molecule/teku-geth/prepare.yml index cd799070c5..eeb21f350d 100644 --- a/controls/roles/manage-service/molecule/teku-geth/prepare.yml +++ b/controls/roles/manage-service/molecule/teku-geth/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,18 +13,17 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - # EOF diff --git a/controls/roles/manage-service/molecule/write-start/create.yml b/controls/roles/manage-service/molecule/write-start/create.yml index b39bd9e1a1..461494c9a4 100644 --- a/controls/roles/manage-service/molecule/write-start/create.yml +++ b/controls/roles/manage-service/molecule/write-start/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -54,13 +54,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/manage-service/molecule/write-start/destroy.yml b/controls/roles/manage-service/molecule/write-start/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/manage-service/molecule/write-start/destroy.yml +++ b/controls/roles/manage-service/molecule/write-start/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/manage-service/molecule/write-start/molecule.yml b/controls/roles/manage-service/molecule/write-start/molecule.yml index b2d2f9fed2..43ab18a76c 100644 --- a/controls/roles/manage-service/molecule/write-start/molecule.yml +++ b/controls/roles/manage-service/molecule/write-start/molecule.yml @@ -4,11 +4,12 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "manage-service--write-start--ubuntu-22.04" - server_type: cx22 - image: ubuntu-22.04 - # - name: "role-manage--write-start--ubuntu-20.04" - # server_type: cx22 + - name: "manage-service--write-start--ubuntu-24.04" + server_type: cpx11 + image: ubuntu-24.04 + location: hil + # - name: "role-manage--write-start--ubuntu-24.04" + # server_type: cpx11 # image: centos-7 provisioner: name: ansible diff --git a/controls/roles/manage-service/molecule/write-start/prepare.yml b/controls/roles/manage-service/molecule/write-start/prepare.yml index 50332be8f4..67aa9817fe 100644 --- a/controls/roles/manage-service/molecule/write-start/prepare.yml +++ b/controls/roles/manage-service/molecule/write-start/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -14,13 +14,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: - name: "setup" \ No newline at end of file + name: "setup" diff --git a/controls/roles/manage-service/tasks/main.yml b/controls/roles/manage-service/tasks/main.yml index 4d99a308af..1632ba8173 100644 --- a/controls/roles/manage-service/tasks/main.yml +++ b/controls/roles/manage-service/tasks/main.yml @@ -80,7 +80,7 @@ proto: "{{ item.split('/')[1] | default('any') }}" delete: "{{ 'yes' if stereum.manage_service.state == 'stopped' else 'no' }}" environment: - PATH: /sbin:{{ ansible_env.PATH }} + PATH: /sbin:{{ ansible_facts['env'].PATH }} with_items: "{{ stereum_service_configuration.ports }}" when: stereum.manage_service.state != "restarted" and stereum_service_configuration.ports is defined diff --git a/controls/roles/prune-geth/molecule/default/create.yml b/controls/roles/prune-geth/molecule/default/create.yml index c1161312d5..aa9ee44702 100644 --- a/controls/roles/prune-geth/molecule/default/create.yml +++ b/controls/roles/prune-geth/molecule/default/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -93,5 +95,4 @@ search_regex: SSH delay: 10 with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" - #EOF diff --git a/controls/roles/prune-geth/molecule/default/destroy.yml b/controls/roles/prune-geth/molecule/default/destroy.yml index 215639378d..8a0d5947ae 100644 --- a/controls/roles/prune-geth/molecule/default/destroy.yml +++ b/controls/roles/prune-geth/molecule/default/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: @@ -53,5 +59,4 @@ content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" when: server.changed | bool - #EOF diff --git a/controls/roles/prune-geth/molecule/default/molecule.yml b/controls/roles/prune-geth/molecule/default/molecule.yml index 3dbdcb6bc8..1e102c1616 100644 --- a/controls/roles/prune-geth/molecule/default/molecule.yml +++ b/controls/roles/prune-geth/molecule/default/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "prune-geth--default--ubuntu-22.04" + - name: "prune-geth--default--ubuntu-24.04" hostname: ubuntu server_type: cpx21 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "prune-geth--default--centos-stream-8" # hostname: "centos" # server_type: cpx21 diff --git a/controls/roles/prune-geth/molecule/default/prepare.yml b/controls/roles/prune-geth/molecule/default/prepare.yml index dd07484808..6bf444d6df 100644 --- a/controls/roles/prune-geth/molecule/default/prepare.yml +++ b/controls/roles/prune-geth/molecule/default/prepare.yml @@ -17,27 +17,27 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - include_role: name: "configure-firewall" - + # geth service - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -67,5 +67,4 @@ volumes: - "/opt/app/services/{{ geth_service }}/data:/opt/app/geth" - "/opt/app/services/{{ geth_service }}/engine.jwt:/engine.jwt" - #EOF diff --git a/controls/roles/restart-services/molecule/default/create.yml b/controls/roles/restart-services/molecule/default/create.yml index 9475eea782..48363a32b6 100644 --- a/controls/roles/restart-services/molecule/default/create.yml +++ b/controls/roles/restart-services/molecule/default/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -64,13 +64,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool @@ -92,4 +94,4 @@ host: "{{ item.address }}" search_regex: SSH delay: 10 - with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" \ No newline at end of file + with_items: "{{ lookup('file', molecule_instance_config) | from_yaml }}" diff --git a/controls/roles/restart-services/molecule/default/destroy.yml b/controls/roles/restart-services/molecule/default/destroy.yml index 0168cc5a01..58b0748e2a 100644 --- a/controls/roles/restart-services/molecule/default/destroy.yml +++ b/controls/roles/restart-services/molecule/default/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 - name: Populate instance config set_fact: @@ -52,4 +58,4 @@ copy: content: "{{ instance_conf | to_yaml }}" dest: "{{ molecule_instance_config }}" - when: server.changed | bool \ No newline at end of file + when: server.changed | bool diff --git a/controls/roles/restart-services/molecule/default/molecule.yml b/controls/roles/restart-services/molecule/default/molecule.yml index 2e04aa3bdb..f2d64aec52 100644 --- a/controls/roles/restart-services/molecule/default/molecule.yml +++ b/controls/roles/restart-services/molecule/default/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "restart-services--default--ubuntu-22.04" + - name: "restart-services--default--ubuntu-24.04" hostname: ubuntu server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil provisioner: name: ansible config_options: diff --git a/controls/roles/restart-services/molecule/default/prepare.yml b/controls/roles/restart-services/molecule/default/prepare.yml index 5da59a88bb..8c648c998b 100644 --- a/controls/roles/restart-services/molecule/default/prepare.yml +++ b/controls/roles/restart-services/molecule/default/prepare.yml @@ -18,13 +18,13 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" @@ -237,7 +237,7 @@ id: "{{ lighthouse_service2 }}" - debug: - msg: "{{ ansible_date_time.epoch }}" + msg: "{{ ansible_facts['date_time']['epoch'] }}" - pause: seconds: 30 diff --git a/controls/roles/setup/molecule/default/create.yml b/controls/roles/setup/molecule/default/create.yml index b39bd9e1a1..461494c9a4 100644 --- a/controls/roles/setup/molecule/default/create.yml +++ b/controls/roles/setup/molecule/default/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -54,13 +54,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/setup/molecule/default/destroy.yml b/controls/roles/setup/molecule/default/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/setup/molecule/default/destroy.yml +++ b/controls/roles/setup/molecule/default/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/setup/molecule/default/molecule.yml b/controls/roles/setup/molecule/default/molecule.yml index 1f99544c3e..4237040c71 100644 --- a/controls/roles/setup/molecule/default/molecule.yml +++ b/controls/roles/setup/molecule/default/molecule.yml @@ -4,11 +4,12 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "setup--default--ubuntu-22.04" - server_type: cx22 - image: ubuntu-22.04 + - name: "setup--default--ubuntu-24.04" + server_type: cpx11 + image: ubuntu-24.04 + location: hil # - name: "setup--default--centos-stream-8" -# server_type: cx22 +# server_type: cpx11 # image: centos-stream-8 provisioner: name: ansible diff --git a/controls/roles/setup/molecule/default/prepare.yml b/controls/roles/setup/molecule/default/prepare.yml index 39baf22a4c..182ec072e9 100644 --- a/controls/roles/setup/molecule/default/prepare.yml +++ b/controls/roles/setup/molecule/default/prepare.yml @@ -9,10 +9,10 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" diff --git a/controls/roles/setup/molecule/default/verify.yml b/controls/roles/setup/molecule/default/verify.yml index f2ee0b8fad..e915f08c3a 100644 --- a/controls/roles/setup/molecule/default/verify.yml +++ b/controls/roles/setup/molecule/default/verify.yml @@ -5,33 +5,32 @@ hosts: all gather_facts: false tasks: + # Stereum config files + - stat: path=/etc/stereum/stereum.yaml + register: stereum_config_file + - stat: path=/etc/stereum/services + register: stereum_services_dir + - debug: + msg: "{{ stereum_config_file }}" + - name: Check for config + assert: + that: + - stereum_config_file.stat.exists + - stereum_services_dir.stat.isdir is defined and stereum_services_dir.stat.isdir - # Stereum config files - - stat: path=/etc/stereum/stereum.yaml - register: stereum_config_file - - stat: path=/etc/stereum/services - register: stereum_services_dir - - debug: - msg: "{{ stereum_config_file }}" - - name: Check for config - assert: - that: - - stereum_config_file.stat.exists - - stereum_services_dir.stat.isdir is defined and stereum_services_dir.stat.isdir - - # Docker installation - - shell: docker info - register: stereum_docker_info - - name: Check for docker - assert: - that: - - stereum_docker_info.rc == 0 + # Docker installation + - shell: docker info + register: stereum_docker_info + - name: Check for docker + assert: + that: + - stereum_docker_info.rc == 0 - # Timesyncd - - shell: timedatectl status - register: stereum_timesyncd_status - - name: Check timedatectl status - assert: - that: - - stereum_timesyncd_status.rc == 0 - - stereum_timesyncd_status.stdout.find("NTP service: active") != -1 \ No newline at end of file + # Timesyncd + - shell: timedatectl status + register: stereum_timesyncd_status + - name: Check timedatectl status + assert: + that: + - stereum_timesyncd_status.rc == 0 + - "'NTP service: active' in stereum_timesyncd_status.stdout" diff --git a/controls/roles/setup/tasks/docker-ubuntu.yaml b/controls/roles/setup/tasks/docker-ubuntu.yaml index a9a6871478..4b2c110fed 100644 --- a/controls/roles/setup/tasks/docker-ubuntu.yaml +++ b/controls/roles/setup/tasks/docker-ubuntu.yaml @@ -29,7 +29,7 @@ - name: Add Docker Repository apt_repository: - repo: "deb https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable" + repo: "deb https://download.docker.com/linux/ubuntu {{ ansible_facts['distribution_release'] }} stable" - name: Update apt and install docker-ce apt: diff --git a/controls/roles/setup/tasks/docker.yml b/controls/roles/setup/tasks/docker.yml index 4bd2f1686f..b8a0fa0b62 100644 --- a/controls/roles/setup/tasks/docker.yml +++ b/controls/roles/setup/tasks/docker.yml @@ -1,15 +1,15 @@ --- - name: Docker on CentOS include_tasks: docker-centos.yaml - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - name: Docker on Ubuntu include_tasks: docker-ubuntu.yaml - when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' + when: ansible_facts['distribution'] == 'Debian' or ansible_facts['distribution'] == 'Ubuntu' - name: Enable service docker systemd: name: docker enabled: yes masked: no - state: started \ No newline at end of file + state: started diff --git a/controls/roles/setup/tasks/main.yml b/controls/roles/setup/tasks/main.yml index 960393ee9d..e1694a1b6d 100644 --- a/controls/roles/setup/tasks/main.yml +++ b/controls/roles/setup/tasks/main.yml @@ -5,16 +5,16 @@ when: stereum is undefined - include_tasks: update-os-ubuntu.yml - when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' + when: ansible_facts['distribution'] == 'Debian' or ansible_facts['distribution'] == 'Ubuntu' - include_tasks: update-os-centos.yml - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_tasks: timesyncd.yml - include_tasks: docker.yml - include_tasks: zip-centos.yml - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_tasks: stereum-config.yml diff --git a/controls/roles/setup/tasks/timesyncd.yml b/controls/roles/setup/tasks/timesyncd.yml index b424e24cd2..6d3abc5f01 100644 --- a/controls/roles/setup/tasks/timesyncd.yml +++ b/controls/roles/setup/tasks/timesyncd.yml @@ -3,13 +3,13 @@ package: name: systemd-timesyncd state: present - when: ansible_distribution == 'Ubuntu' + when: ansible_facts['distribution'] == 'Ubuntu' - name: Install timesyncd yum: name: systemd-timesyncd state: present - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - name: enable service systemd-timesyncd systemd: diff --git a/controls/roles/ssv-key-generator/molecule/default/create.yml b/controls/roles/ssv-key-generator/molecule/default/create.yml index b39bd9e1a1..461494c9a4 100644 --- a/controls/roles/ssv-key-generator/molecule/default/create.yml +++ b/controls/roles/ssv-key-generator/molecule/default/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -54,13 +54,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/ssv-key-generator/molecule/default/destroy.yml b/controls/roles/ssv-key-generator/molecule/default/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/ssv-key-generator/molecule/default/destroy.yml +++ b/controls/roles/ssv-key-generator/molecule/default/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/ssv-key-generator/molecule/default/molecule.yml b/controls/roles/ssv-key-generator/molecule/default/molecule.yml index afa35de4c1..66a80cb1d9 100644 --- a/controls/roles/ssv-key-generator/molecule/default/molecule.yml +++ b/controls/roles/ssv-key-generator/molecule/default/molecule.yml @@ -4,10 +4,11 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "ssv-key-generator--default--ubuntu-22.04" + - name: "ssv-key-generator--default--ubuntu-24.04" hostname: ubuntu server_type: cpx21 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "ssv-key-generator--default--centos-stream-8" # hostname: "centos" # server_type: cpx31 diff --git a/controls/roles/ssv-key-generator/molecule/default/prepare.yml b/controls/roles/ssv-key-generator/molecule/default/prepare.yml index 3d299bb4fa..eeb21f350d 100644 --- a/controls/roles/ssv-key-generator/molecule/default/prepare.yml +++ b/controls/roles/ssv-key-generator/molecule/default/prepare.yml @@ -13,13 +13,13 @@ name: pip become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" diff --git a/controls/roles/switch-repos/molecule/default/create.yml b/controls/roles/switch-repos/molecule/default/create.yml index b39bd9e1a1..461494c9a4 100644 --- a/controls/roles/switch-repos/molecule/default/create.yml +++ b/controls/roles/switch-repos/molecule/default/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -54,13 +54,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/switch-repos/molecule/default/destroy.yml b/controls/roles/switch-repos/molecule/default/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/switch-repos/molecule/default/destroy.yml +++ b/controls/roles/switch-repos/molecule/default/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/switch-repos/molecule/default/molecule.yml b/controls/roles/switch-repos/molecule/default/molecule.yml index 86e1d51018..451db4af59 100644 --- a/controls/roles/switch-repos/molecule/default/molecule.yml +++ b/controls/roles/switch-repos/molecule/default/molecule.yml @@ -4,9 +4,10 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "switch-repos--default--ubuntu-22.04" - server_type: cx22 - image: ubuntu-22.04 + - name: "switch-repos--default--ubuntu-24.04" + server_type: cpx11 + image: ubuntu-24.04 + location: hil provisioner: name: ansible config_options: diff --git a/controls/roles/update-changes/molecule/243/create.yml b/controls/roles/update-changes/molecule/243/create.yml index b39bd9e1a1..461494c9a4 100644 --- a/controls/roles/update-changes/molecule/243/create.yml +++ b/controls/roles/update-changes/molecule/243/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -54,13 +54,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/update-changes/molecule/243/destroy.yml b/controls/roles/update-changes/molecule/243/destroy.yml index 3a5a8a2465..6ce87887fe 100644 --- a/controls/roles/update-changes/molecule/243/destroy.yml +++ b/controls/roles/update-changes/molecule/243/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/update-changes/molecule/243/molecule.yml b/controls/roles/update-changes/molecule/243/molecule.yml index 1aa432a2fe..cca726cb25 100644 --- a/controls/roles/update-changes/molecule/243/molecule.yml +++ b/controls/roles/update-changes/molecule/243/molecule.yml @@ -5,8 +5,9 @@ driver: name: molecule_hetznercloud platforms: - name: "update-changes--2.4.3--ubuntu-24.04" - server_type: cx22 + server_type: cpx11 image: ubuntu-24.04 + location: hil provisioner: name: ansible config_options: diff --git a/controls/roles/update-changes/molecule/243/prepare.yml b/controls/roles/update-changes/molecule/243/prepare.yml index e022c61908..456cd00c49 100644 --- a/controls/roles/update-changes/molecule/243/prepare.yml +++ b/controls/roles/update-changes/molecule/243/prepare.yml @@ -14,13 +14,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" diff --git a/controls/roles/update-os/molecule/default/create.yml b/controls/roles/update-os/molecule/default/create.yml index b39bd9e1a1..461494c9a4 100644 --- a/controls/roles/update-os/molecule/default/create.yml +++ b/controls/roles/update-os/molecule/default/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -54,13 +54,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/update-os/molecule/default/destroy.yml b/controls/roles/update-os/molecule/default/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/update-os/molecule/default/destroy.yml +++ b/controls/roles/update-os/molecule/default/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/update-os/molecule/default/molecule.yml b/controls/roles/update-os/molecule/default/molecule.yml index 93599b5117..fd2c8e4fc4 100644 --- a/controls/roles/update-os/molecule/default/molecule.yml +++ b/controls/roles/update-os/molecule/default/molecule.yml @@ -4,9 +4,10 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "update-os--default--ubuntu-22.04" - server_type: cx22 - image: ubuntu-22.04 + - name: "update-os--default--ubuntu-24.04" + server_type: cpx11 + image: ubuntu-24.04 + location: hil provisioner: name: ansible config_options: diff --git a/controls/roles/update-os/molecule/default/prepare.yml b/controls/roles/update-os/molecule/default/prepare.yml index f7c4186375..083ef1252e 100644 --- a/controls/roles/update-os/molecule/default/prepare.yml +++ b/controls/roles/update-os/molecule/default/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,20 +13,20 @@ upgrade: dist become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (Ubuntu) apt: name: pip state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - name: Install p3-pip, expect (Ubuntu) apt: @@ -35,7 +35,7 @@ - expect - git become: true - when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' + when: ansible_facts['distribution'] == 'Debian' or ansible_facts['distribution'] == 'Ubuntu' - name: Install pip, expect (CentOS 8) yum: @@ -45,6 +45,5 @@ - git state: latest become: true - when: ansible_distribution == "CentOS" - + when: ansible_facts['distribution'] == "CentOS" # EOF diff --git a/controls/roles/update-os/molecule/run-stereum-service-update/create.yml b/controls/roles/update-os/molecule/run-stereum-service-update/create.yml index b39bd9e1a1..461494c9a4 100644 --- a/controls/roles/update-os/molecule/run-stereum-service-update/create.yml +++ b/controls/roles/update-os/molecule/run-stereum-service-update/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -54,13 +54,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/update-os/molecule/run-stereum-service-update/destroy.yml b/controls/roles/update-os/molecule/run-stereum-service-update/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/update-os/molecule/run-stereum-service-update/destroy.yml +++ b/controls/roles/update-os/molecule/run-stereum-service-update/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/update-os/molecule/run-stereum-service-update/molecule.yml b/controls/roles/update-os/molecule/run-stereum-service-update/molecule.yml index 785864193c..20416f4bef 100644 --- a/controls/roles/update-os/molecule/run-stereum-service-update/molecule.yml +++ b/controls/roles/update-os/molecule/run-stereum-service-update/molecule.yml @@ -4,9 +4,10 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "update-os--run-stereum-service-update--ubuntu-22.04" - server_type: cx22 - image: ubuntu-22.04 + - name: "update-os--run-stereum-service-update--ubuntu-24.04" + server_type: cpx11 + image: ubuntu-24.04 + location: hil provisioner: name: ansible config_options: diff --git a/controls/roles/update-os/molecule/run-stereum-service-update/prepare.yml b/controls/roles/update-os/molecule/run-stereum-service-update/prepare.yml index 4d00419b41..3afac086b9 100644 --- a/controls/roles/update-os/molecule/run-stereum-service-update/prepare.yml +++ b/controls/roles/update-os/molecule/run-stereum-service-update/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,20 +13,20 @@ upgrade: dist become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (Ubuntu) apt: name: pip state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - name: Install p3-pip, expect (Ubuntu) apt: @@ -35,7 +35,7 @@ - expect - git become: true - when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' + when: ansible_facts['distribution'] == 'Debian' or ansible_facts['distribution'] == 'Ubuntu' - name: Install pip, expect (CentOS 8) yum: @@ -45,7 +45,7 @@ - git state: latest become: true - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - name: dummy directories file: @@ -64,5 +64,4 @@ group: "root" mode: 0755 become: true - # EOF diff --git a/controls/roles/update-package/molecule/default/create.yml b/controls/roles/update-package/molecule/default/create.yml index b39bd9e1a1..461494c9a4 100644 --- a/controls/roles/update-package/molecule/default/create.yml +++ b/controls/roles/update-package/molecule/default/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -54,13 +54,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/update-package/molecule/default/destroy.yml b/controls/roles/update-package/molecule/default/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/update-package/molecule/default/destroy.yml +++ b/controls/roles/update-package/molecule/default/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/update-package/molecule/default/molecule.yml b/controls/roles/update-package/molecule/default/molecule.yml index 57ab0d836f..d2508e8612 100644 --- a/controls/roles/update-package/molecule/default/molecule.yml +++ b/controls/roles/update-package/molecule/default/molecule.yml @@ -4,9 +4,10 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "update-package--default--ubuntu-22.04" - server_type: cx22 - image: ubuntu-22.04 + - name: "update-package--default--ubuntu-24.04" + server_type: cpx11 + image: ubuntu-24.04 + location: hil provisioner: name: ansible config_options: diff --git a/controls/roles/update-services/molecule/default/create.yml b/controls/roles/update-services/molecule/default/create.yml index b39bd9e1a1..461494c9a4 100644 --- a/controls/roles/update-services/molecule/default/create.yml +++ b/controls/roles/update-services/molecule/default/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -54,13 +54,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/update-services/molecule/default/destroy.yml b/controls/roles/update-services/molecule/default/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/update-services/molecule/default/destroy.yml +++ b/controls/roles/update-services/molecule/default/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/update-services/molecule/default/molecule.yml b/controls/roles/update-services/molecule/default/molecule.yml index d41999ea16..fd551a82e7 100644 --- a/controls/roles/update-services/molecule/default/molecule.yml +++ b/controls/roles/update-services/molecule/default/molecule.yml @@ -5,9 +5,10 @@ driver: name: molecule_hetznercloud platforms: # cpx31 for the storage requirements - - name: "update-services--default--ubuntu-22.04" + - name: "update-services--default--ubuntu-24.04" server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "update-services--default--centos-stream-8" # server_type: cpx31 # image: centos-stream-8 diff --git a/controls/roles/update-services/molecule/default/prepare.yml b/controls/roles/update-services/molecule/default/prepare.yml index 6d78b1d71f..1a4d4767df 100644 --- a/controls/roles/update-services/molecule/default/prepare.yml +++ b/controls/roles/update-services/molecule/default/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -14,13 +14,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" @@ -98,11 +98,11 @@ become: yes - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -112,11 +112,11 @@ id: 9024aec6-12a8-456a-8096-ee7ef6f67167 - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -124,5 +124,4 @@ state: started configuration: id: f3a6cbe4-5e4b-4ba4-a0f2-2504b6750379 - # EOF diff --git a/controls/roles/update-services/molecule/single-service/create.yml b/controls/roles/update-services/molecule/single-service/create.yml index b39bd9e1a1..461494c9a4 100644 --- a/controls/roles/update-services/molecule/single-service/create.yml +++ b/controls/roles/update-services/molecule/single-service/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -54,13 +54,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/update-services/molecule/single-service/destroy.yml b/controls/roles/update-services/molecule/single-service/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/update-services/molecule/single-service/destroy.yml +++ b/controls/roles/update-services/molecule/single-service/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/update-services/molecule/single-service/molecule.yml b/controls/roles/update-services/molecule/single-service/molecule.yml index 5ffa9769a0..d16e10d06c 100644 --- a/controls/roles/update-services/molecule/single-service/molecule.yml +++ b/controls/roles/update-services/molecule/single-service/molecule.yml @@ -5,9 +5,10 @@ driver: name: molecule_hetznercloud platforms: # cpx31 for the storage requirements - - name: "update-services--single-service--ubuntu-22.04" + - name: "update-services--single-service--ubuntu-24.04" server_type: cpx31 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "update-services--default--centos-stream-8" # server_type: cpx31 # image: centos-stream-8 diff --git a/controls/roles/update-services/molecule/single-service/prepare.yml b/controls/roles/update-services/molecule/single-service/prepare.yml index 6d78b1d71f..1a4d4767df 100644 --- a/controls/roles/update-services/molecule/single-service/prepare.yml +++ b/controls/roles/update-services/molecule/single-service/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -14,13 +14,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" @@ -98,11 +98,11 @@ become: yes - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -112,11 +112,11 @@ id: 9024aec6-12a8-456a-8096-ee7ef6f67167 - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -124,5 +124,4 @@ state: started configuration: id: f3a6cbe4-5e4b-4ba4-a0f2-2504b6750379 - # EOF diff --git a/controls/roles/update-stereum/molecule/default/create.yml b/controls/roles/update-stereum/molecule/default/create.yml index b39bd9e1a1..461494c9a4 100644 --- a/controls/roles/update-stereum/molecule/default/create.yml +++ b/controls/roles/update-stereum/molecule/default/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -54,13 +54,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/update-stereum/molecule/default/destroy.yml b/controls/roles/update-stereum/molecule/default/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/update-stereum/molecule/default/destroy.yml +++ b/controls/roles/update-stereum/molecule/default/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/update-stereum/molecule/default/molecule.yml b/controls/roles/update-stereum/molecule/default/molecule.yml index 1d1aea6130..ae1f9336c1 100644 --- a/controls/roles/update-stereum/molecule/default/molecule.yml +++ b/controls/roles/update-stereum/molecule/default/molecule.yml @@ -4,11 +4,12 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "update-stereum--default--ubuntu-22.04" - server_type: cx22 - image: ubuntu-22.04 + - name: "update-stereum--default--ubuntu-24.04" + server_type: cpx11 + image: ubuntu-24.04 + location: hil # - name: "update-stereum--default--centos-stream-8" -# server_type: cx22 +# server_type: cpx11 # image: centos-stream-8 provisioner: name: ansible diff --git a/controls/roles/update-stereum/molecule/default/prepare.yml b/controls/roles/update-stereum/molecule/default/prepare.yml index 2ad6c5dad7..5abd32d47f 100644 --- a/controls/roles/update-stereum/molecule/default/prepare.yml +++ b/controls/roles/update-stereum/molecule/default/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -14,13 +14,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - name: Install pip, expect (Ubuntu) apt: @@ -30,7 +30,7 @@ - expect - git become: true - when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' + when: ansible_facts['distribution'] == 'Debian' or ansible_facts['distribution'] == 'Ubuntu' - name: Install pip, expect (CentOS 8) yum: @@ -40,12 +40,11 @@ - git state: latest become: true - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - # now let's setup the repo same way as with # launcher/src/backend/NodeConnection.js#prepareStereumNode() # only with an old tag, then update to new tag @@ -60,8 +59,8 @@ args: chdir: "/opt/stereum/ansible" with_items: - - "git init" - - "git remote add -f ethereum-node https://github.com/stereum-dev/ethereum-node.git" - - "git config core.sparseCheckout true" - - "echo 'controls' >> .git/info/sparse-checkout" - - "git checkout 0f442c192c1fe508f6d2ef4288b56cbd0ffbfe68" \ No newline at end of file + - "git init" + - "git remote add -f ethereum-node https://github.com/stereum-dev/ethereum-node.git" + - "git config core.sparseCheckout true" + - "echo 'controls' >> .git/info/sparse-checkout" + - "git checkout 0f442c192c1fe508f6d2ef4288b56cbd0ffbfe68" diff --git a/controls/roles/update-stereum/molecule/full/create.yml b/controls/roles/update-stereum/molecule/full/create.yml index b39bd9e1a1..461494c9a4 100644 --- a/controls/roles/update-stereum/molecule/full/create.yml +++ b/controls/roles/update-stereum/molecule/full/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -54,13 +54,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/update-stereum/molecule/full/destroy.yml b/controls/roles/update-stereum/molecule/full/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/update-stereum/molecule/full/destroy.yml +++ b/controls/roles/update-stereum/molecule/full/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/update-stereum/molecule/full/molecule.yml b/controls/roles/update-stereum/molecule/full/molecule.yml index dd3cb88feb..43ccf14c42 100644 --- a/controls/roles/update-stereum/molecule/full/molecule.yml +++ b/controls/roles/update-stereum/molecule/full/molecule.yml @@ -6,9 +6,10 @@ driver: platforms: - name: "update-stereum--full--ubuntu-2204" server_type: cpx21 - image: ubuntu-22.04 + image: ubuntu-24.04 + location: hil # - name: "update-stereum--default--centos-stream-8" -# server_type: cx22 +# server_type: cpx11 # image: centos-stream-8 provisioner: name: ansible diff --git a/controls/roles/update-stereum/molecule/full/prepare.yml b/controls/roles/update-stereum/molecule/full/prepare.yml index f340ffbaa0..2e808fe1be 100644 --- a/controls/roles/update-stereum/molecule/full/prepare.yml +++ b/controls/roles/update-stereum/molecule/full/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -11,7 +11,7 @@ # raw: apt update && apt install -y pip ansible # become: true # changed_when: false - # when: ansible_distribution == "Ubuntu" + # when: ansible_facts['distribution'] == "Ubuntu" - name: Install apt repo deps (Ubuntu) apt: update_cache: yes @@ -19,7 +19,7 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Add source repository into sources list apt_repository: @@ -34,13 +34,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar ansible && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" @@ -62,11 +62,11 @@ args: chdir: "/opt/stereum/ansible" with_items: - - "git init" - - "git remote add -f ethereum-node https://github.com/stereum-dev/ethereum-node.git" # FIXME - - "git config core.sparseCheckout true" - - "echo 'controls' >> .git/info/sparse-checkout" - - "git checkout c531dc2e89ec30c289e886fb3ff2a763e92b21d5" + - "git init" + - "git remote add -f ethereum-node https://github.com/stereum-dev/ethereum-node.git" # FIXME + - "git config core.sparseCheckout true" + - "echo 'controls' >> .git/info/sparse-checkout" + - "git checkout c531dc2e89ec30c289e886fb3ff2a763e92b21d5" # spin up some services to update - name: Write service configuration lighthouse beacon @@ -133,11 +133,11 @@ become: yes - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -147,11 +147,11 @@ id: 9024aec6-12a8-456a-8096-ee7ef6f67167 - block: - - set_fact: - stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" - - name: "Include manage-service" - include_role: - name: "manage-service" + - set_fact: + stereum: "{{ stereum_static | combine(stereum_args, recursive=True) }}" + - name: "Include manage-service" + include_role: + name: "manage-service" vars: stereum_args: manage_service: @@ -159,5 +159,4 @@ state: started configuration: id: f3a6cbe4-5e4b-4ba4-a0f2-2504b6750379 - # EOF diff --git a/controls/roles/update-stereum/molecule/override/create.yml b/controls/roles/update-stereum/molecule/override/create.yml index b39bd9e1a1..461494c9a4 100644 --- a/controls/roles/update-stereum/molecule/override/create.yml +++ b/controls/roles/update-stereum/molecule/override/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -54,13 +54,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/update-stereum/molecule/override/destroy.yml b/controls/roles/update-stereum/molecule/override/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/update-stereum/molecule/override/destroy.yml +++ b/controls/roles/update-stereum/molecule/override/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/update-stereum/molecule/override/molecule.yml b/controls/roles/update-stereum/molecule/override/molecule.yml index 1fb3070147..df5d9fe927 100644 --- a/controls/roles/update-stereum/molecule/override/molecule.yml +++ b/controls/roles/update-stereum/molecule/override/molecule.yml @@ -4,11 +4,12 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "update-stereum--override--ubuntu-22.04" - server_type: cx22 - image: ubuntu-22.04 + - name: "update-stereum--override--ubuntu-24.04" + server_type: cpx11 + image: ubuntu-24.04 + location: hil # - name: "update-stereum--default--centos-stream-8" -# server_type: cx22 +# server_type: cpx11 # image: centos-stream-8 provisioner: name: ansible diff --git a/controls/roles/update-stereum/molecule/override/prepare.yml b/controls/roles/update-stereum/molecule/override/prepare.yml index 2ad6c5dad7..5abd32d47f 100644 --- a/controls/roles/update-stereum/molecule/override/prepare.yml +++ b/controls/roles/update-stereum/molecule/override/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -14,13 +14,13 @@ state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - name: Install pip, expect (Ubuntu) apt: @@ -30,7 +30,7 @@ - expect - git become: true - when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' + when: ansible_facts['distribution'] == 'Debian' or ansible_facts['distribution'] == 'Ubuntu' - name: Install pip, expect (CentOS 8) yum: @@ -40,12 +40,11 @@ - git state: latest become: true - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - include_role: name: "setup" - # now let's setup the repo same way as with # launcher/src/backend/NodeConnection.js#prepareStereumNode() # only with an old tag, then update to new tag @@ -60,8 +59,8 @@ args: chdir: "/opt/stereum/ansible" with_items: - - "git init" - - "git remote add -f ethereum-node https://github.com/stereum-dev/ethereum-node.git" - - "git config core.sparseCheckout true" - - "echo 'controls' >> .git/info/sparse-checkout" - - "git checkout 0f442c192c1fe508f6d2ef4288b56cbd0ffbfe68" \ No newline at end of file + - "git init" + - "git remote add -f ethereum-node https://github.com/stereum-dev/ethereum-node.git" + - "git config core.sparseCheckout true" + - "echo 'controls' >> .git/info/sparse-checkout" + - "git checkout 0f442c192c1fe508f6d2ef4288b56cbd0ffbfe68" diff --git a/controls/roles/upgrade-prep/molecule/default/create.yml b/controls/roles/upgrade-prep/molecule/default/create.yml index b39bd9e1a1..461494c9a4 100644 --- a/controls/roles/upgrade-prep/molecule/default/create.yml +++ b/controls/roles/upgrade-prep/molecule/default/create.yml @@ -35,7 +35,7 @@ - "{{ ssh_key_name }}" volumes: "{{ item.volumes | default(omit) }}" image: "{{ item.image }}" - datacenter: "{{ item.datacenter | default(omit) }}" + location: "{{ item.location | default(omit) }}" user_data: "{{ item.user_data | default(omit) }}" api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}" state: present @@ -54,13 +54,15 @@ - name: Populate instance config dict set_fact: - instance_conf_dict: { - 'instance': "{{ item.hcloud_server.name }}", - 'ssh_key_name': "{{ ssh_key_name }}", - 'address': "{{ item.hcloud_server.ipv4_address }}", - 'user': "{{ ssh_user }}", - 'port': "{{ ssh_port }}", - 'identity_file': "{{ ssh_path }}", } + instance_conf_dict: + { + "instance": "{{ item.hcloud_server.name }}", + "ssh_key_name": "{{ ssh_key_name }}", + "address": "{{ item.hcloud_server.ipv4_address }}", + "user": "{{ ssh_user }}", + "port": "{{ ssh_port }}", + "identity_file": "{{ ssh_path }}", + } with_items: "{{ hetzner_jobs.results }}" register: instance_config_dict when: server.changed | bool diff --git a/controls/roles/upgrade-prep/molecule/default/destroy.yml b/controls/roles/upgrade-prep/molecule/default/destroy.yml index c43b533082..6ce87887fe 100644 --- a/controls/roles/upgrade-prep/molecule/default/destroy.yml +++ b/controls/roles/upgrade-prep/molecule/default/destroy.yml @@ -24,7 +24,9 @@ state: absent register: server with_items: "{{ instance_conf }}" - when: not skip_instances + when: + - not skip_instances + - instance_conf | length > 0 async: 7200 poll: 0 @@ -34,7 +36,11 @@ register: hetzner_jobs until: hetzner_jobs.finished retries: 300 - with_items: "{{ server.results }}" + delay: 5 + loop: "{{ (server.results | default([])) }}" + when: + - not skip_instances + - instance_conf | length > 0 - name: Remove registered SSH key hcloud_ssh_key: @@ -42,7 +48,7 @@ state: absent when: - not skip_instances - - instance_conf | length # must contain at least one instance + - instance_conf | length > 0 # must contain at least one instance - name: Populate instance config set_fact: diff --git a/controls/roles/upgrade-prep/molecule/default/molecule.yml b/controls/roles/upgrade-prep/molecule/default/molecule.yml index 59a162d0d1..7ad76aafcd 100644 --- a/controls/roles/upgrade-prep/molecule/default/molecule.yml +++ b/controls/roles/upgrade-prep/molecule/default/molecule.yml @@ -4,9 +4,10 @@ dependency: driver: name: molecule_hetznercloud platforms: - - name: "upgrade-prep--default--ubuntu-22.04" - server_type: cx22 - image: ubuntu-22.04 + - name: "upgrade-prep--default--ubuntu-24.04" + server_type: cpx11 + image: ubuntu-24.04 + location: hil provisioner: name: ansible config_options: diff --git a/controls/roles/upgrade-prep/molecule/default/prepare.yml b/controls/roles/upgrade-prep/molecule/default/prepare.yml index f7c4186375..083ef1252e 100644 --- a/controls/roles/upgrade-prep/molecule/default/prepare.yml +++ b/controls/roles/upgrade-prep/molecule/default/prepare.yml @@ -2,7 +2,7 @@ - name: Prepare hosts: all roles: - - role: '../' + - role: "../" vars_files: - ../../../../defaults/stereum_defaults.yaml @@ -13,20 +13,20 @@ upgrade: dist become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (Ubuntu) apt: name: pip state: present become: true changed_when: false - when: ansible_distribution == "Ubuntu" + when: ansible_facts['distribution'] == "Ubuntu" - name: Install python for Ansible (CentOS 8) raw: yum install -y python38 tar && yum remove -y python36 become: true changed_when: false - when: ansible_distribution == "CentOS" + when: ansible_facts['distribution'] == "CentOS" - name: Install p3-pip, expect (Ubuntu) apt: @@ -35,7 +35,7 @@ - expect - git become: true - when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' + when: ansible_facts['distribution'] == 'Debian' or ansible_facts['distribution'] == 'Ubuntu' - name: Install pip, expect (CentOS 8) yum: @@ -45,6 +45,5 @@ - git state: latest become: true - when: ansible_distribution == "CentOS" - + when: ansible_facts['distribution'] == "CentOS" # EOF diff --git a/controls/roles/upgrade-prep/tasks/main.yml b/controls/roles/upgrade-prep/tasks/main.yml index 588a1853ca..ba2d4400d0 100644 --- a/controls/roles/upgrade-prep/tasks/main.yml +++ b/controls/roles/upgrade-prep/tasks/main.yml @@ -1,10 +1,10 @@ --- - name: Get distribution version setup: - filter: ansible_distribution* + filter: ansible_facts['distribution']* - name: Skip if not Ubuntu 22.04 meta: end_host - when: ansible_distribution != 'Ubuntu' or ansible_distribution_version != '22.04' + when: ansible_facts['distribution'] != 'Ubuntu' or ansible_facts['distribution']_version != '22.04' - name: apt clean ansible.builtin.apt: autoclean: true diff --git a/launcher/src/backend/tests/integration/BesuService.int.js b/launcher/src/backend/tests/integration/BesuService.int.js index a89becf993..f207efee6e 100755 --- a/launcher/src/backend/tests/integration/BesuService.int.js +++ b/launcher/src/backend/tests/integration/BesuService.int.js @@ -19,6 +19,7 @@ test("besu installation", async () => { server_type: "cpx21", start_after_create: true, ssh_keys: [keyResponse.ssh_key.id], + location: "hil", }; await testServer.create(serverSettings); diff --git a/launcher/src/backend/tests/integration/ErigonOptimismService.int.js b/launcher/src/backend/tests/integration/ErigonOptimismService.int.js index d0f3b6f9dd..5ffa6cfb4b 100755 --- a/launcher/src/backend/tests/integration/ErigonOptimismService.int.js +++ b/launcher/src/backend/tests/integration/ErigonOptimismService.int.js @@ -19,6 +19,7 @@ test("op-erigon installation", async () => { server_type: "cpx21", start_after_create: true, ssh_keys: [keyResponse.ssh_key.id], + location: "hil", }; await testServer.create(serverSettings); diff --git a/launcher/src/backend/tests/integration/ErigonService.int.js b/launcher/src/backend/tests/integration/ErigonService.int.js index 2589092299..c0fa1aaf9f 100755 --- a/launcher/src/backend/tests/integration/ErigonService.int.js +++ b/launcher/src/backend/tests/integration/ErigonService.int.js @@ -19,6 +19,7 @@ test("erigon installation", async () => { server_type: "cpx21", start_after_create: true, ssh_keys: [keyResponse.ssh_key.id], + location: "hil", }; await testServer.create(serverSettings); diff --git a/launcher/src/backend/tests/integration/FlashbotsMevBoostService.int.js b/launcher/src/backend/tests/integration/FlashbotsMevBoostService.int.js index e8e6e6e212..2aba9e4275 100755 --- a/launcher/src/backend/tests/integration/FlashbotsMevBoostService.int.js +++ b/launcher/src/backend/tests/integration/FlashbotsMevBoostService.int.js @@ -19,6 +19,7 @@ test("mevboost installation", async () => { server_type: "cpx21", start_after_create: true, ssh_keys: [keyResponse.ssh_key.id], + location: "hil", }; await testServer.create(serverSettings); diff --git a/launcher/src/backend/tests/integration/GethLayer2Service.int.js b/launcher/src/backend/tests/integration/GethLayer2Service.int.js index 6babcaaf21..74fe333ac4 100755 --- a/launcher/src/backend/tests/integration/GethLayer2Service.int.js +++ b/launcher/src/backend/tests/integration/GethLayer2Service.int.js @@ -19,6 +19,7 @@ test("l2geth installation", async () => { server_type: "cpx21", start_after_create: true, ssh_keys: [keyResponse.ssh_key.id], + location: "hil", }; await testServer.create(serverSettings); diff --git a/launcher/src/backend/tests/integration/GethOptimismService.int.js b/launcher/src/backend/tests/integration/GethOptimismService.int.js index bc7cfe795f..dbcc80429b 100755 --- a/launcher/src/backend/tests/integration/GethOptimismService.int.js +++ b/launcher/src/backend/tests/integration/GethOptimismService.int.js @@ -19,6 +19,7 @@ test("op-geth installation", async () => { server_type: "cpx21", start_after_create: true, ssh_keys: [keyResponse.ssh_key.id], + location: "hil", }; await testServer.create(serverSettings); diff --git a/launcher/src/backend/tests/integration/GethService.int.js b/launcher/src/backend/tests/integration/GethService.int.js index 4822ef3d56..2b9076c1e6 100755 --- a/launcher/src/backend/tests/integration/GethService.int.js +++ b/launcher/src/backend/tests/integration/GethService.int.js @@ -19,6 +19,7 @@ test("geth installation", async () => { server_type: "cpx21", start_after_create: true, ssh_keys: [keyResponse.ssh_key.id], + location: "hil", }; await testServer.create(serverSettings); diff --git a/launcher/src/backend/tests/integration/GrandineBeaconService.int.js b/launcher/src/backend/tests/integration/GrandineBeaconService.int.js index 38ab580731..3341ade2a7 100755 --- a/launcher/src/backend/tests/integration/GrandineBeaconService.int.js +++ b/launcher/src/backend/tests/integration/GrandineBeaconService.int.js @@ -20,6 +20,7 @@ test("grandine consensus client", async () => { server_type: "cpx31", start_after_create: true, ssh_keys: [keyResponse.ssh_key.id], + location: "hil", }; await testServer.create(serverSettings); diff --git a/launcher/src/backend/tests/integration/LighthouseBeaconService.int.js b/launcher/src/backend/tests/integration/LighthouseBeaconService.int.js index 1e8f81f86e..6588982ab3 100755 --- a/launcher/src/backend/tests/integration/LighthouseBeaconService.int.js +++ b/launcher/src/backend/tests/integration/LighthouseBeaconService.int.js @@ -20,6 +20,7 @@ test("lighthouse validator import", async () => { server_type: "cpx31", start_after_create: true, ssh_keys: [keyResponse.ssh_key.id], + location: "hil", }; await testServer.create(serverSettings); diff --git a/launcher/src/backend/tests/integration/LodestarBeaconService.int.js b/launcher/src/backend/tests/integration/LodestarBeaconService.int.js index 77c2aa7c45..251f21ad5c 100755 --- a/launcher/src/backend/tests/integration/LodestarBeaconService.int.js +++ b/launcher/src/backend/tests/integration/LodestarBeaconService.int.js @@ -21,6 +21,7 @@ test("lodestar validator import", async () => { server_type: "cpx31", start_after_create: true, ssh_keys: [keyResponse.ssh_key.id], + location: "hil", }; await testServer.create(serverSettings); diff --git a/launcher/src/backend/tests/integration/NethermindService.int.js b/launcher/src/backend/tests/integration/NethermindService.int.js index 243e79207d..09c13afa8f 100755 --- a/launcher/src/backend/tests/integration/NethermindService.int.js +++ b/launcher/src/backend/tests/integration/NethermindService.int.js @@ -19,6 +19,7 @@ test("nethermind installationm", async () => { server_type: "cpx21", start_after_create: true, ssh_keys: [keyResponse.ssh_key.id], + location: "hil", }; await testServer.create(serverSettings); diff --git a/launcher/src/backend/tests/integration/NimbusBeaconService.int.js b/launcher/src/backend/tests/integration/NimbusBeaconService.int.js index c72a861fdf..522f2373d0 100755 --- a/launcher/src/backend/tests/integration/NimbusBeaconService.int.js +++ b/launcher/src/backend/tests/integration/NimbusBeaconService.int.js @@ -21,6 +21,7 @@ test("nimbus validator import", async () => { server_type: "cpx31", start_after_create: true, ssh_keys: [keyResponse.ssh_key.id], + location: "hil", }; await testServer.create(serverSettings); diff --git a/launcher/src/backend/tests/integration/NodeConnection.int.js b/launcher/src/backend/tests/integration/NodeConnection.int.js index 5aac86d32a..d9de1df545 100755 --- a/launcher/src/backend/tests/integration/NodeConnection.int.js +++ b/launcher/src/backend/tests/integration/NodeConnection.int.js @@ -19,6 +19,7 @@ test("prepareStereumNode on ubuntu", async () => { server_type: "cpx21", start_after_create: true, ssh_keys: [keyResponse.ssh_key.id], + location: "hil", }; await testServer.create(serverSettings); diff --git a/launcher/src/backend/tests/integration/PrysmBeaconService.int.js b/launcher/src/backend/tests/integration/PrysmBeaconService.int.js index 9973ab5eac..210f74daf8 100755 --- a/launcher/src/backend/tests/integration/PrysmBeaconService.int.js +++ b/launcher/src/backend/tests/integration/PrysmBeaconService.int.js @@ -20,6 +20,7 @@ test("prysm validator import", async () => { server_type: "cpx31", start_after_create: true, ssh_keys: [keyResponse.ssh_key.id], + location: "hil", }; await testServer.create(serverSettings); diff --git a/launcher/src/backend/tests/integration/RethOptimismService.int.js b/launcher/src/backend/tests/integration/RethOptimismService.int.js index c963a4f3c2..19982e81c2 100755 --- a/launcher/src/backend/tests/integration/RethOptimismService.int.js +++ b/launcher/src/backend/tests/integration/RethOptimismService.int.js @@ -19,6 +19,7 @@ test("op-reth installation", async () => { server_type: "cpx21", start_after_create: true, ssh_keys: [keyResponse.ssh_key.id], + location: "hil", }; await testServer.create(serverSettings); diff --git a/launcher/src/backend/tests/integration/RethService.int.js b/launcher/src/backend/tests/integration/RethService.int.js index 5c0e810db9..645287e2d5 100644 --- a/launcher/src/backend/tests/integration/RethService.int.js +++ b/launcher/src/backend/tests/integration/RethService.int.js @@ -19,6 +19,7 @@ test("reth installation", async () => { server_type: "cpx21", start_after_create: true, ssh_keys: [keyResponse.ssh_key.id], + location: "hil", }; await testServer.create(serverSettings); diff --git a/launcher/src/backend/tests/integration/TekuBeaconService.int.js b/launcher/src/backend/tests/integration/TekuBeaconService.int.js index bcc709c644..13265a1fb5 100755 --- a/launcher/src/backend/tests/integration/TekuBeaconService.int.js +++ b/launcher/src/backend/tests/integration/TekuBeaconService.int.js @@ -20,6 +20,7 @@ test("teku validator import", async () => { server_type: "cpx31", start_after_create: true, ssh_keys: [keyResponse.ssh_key.id], + location: "hil", }; await testServer.create(serverSettings);