Role - tripleo_compute_node

Role Documentation

Welcome to the “tripleo_compute_node” role documentation.

Role Defaults

This section highlights all of the defaults and variables set within the “tripleo_compute_node” role.

# All variables intended for modification should be placed in this file.

# All variables within this role should have a prefix of "tripleo_compute_node"
tripleo_compute_node_debug: '{{ (ansible_verbosity | int) >= 2 | bool }}'
tripleo_compute_node_hide_sensitive_logs: true

Role Variables: main.yml

null
...

Molecule Scenarios

Molecule is being used to test the “tripleo_compute_node” role. The following section highlights the drivers in service and provides an example playbook showing how the role is leveraged.

Scenario: default

Driver: podman
Molecule Inventory
hosts:
  all:
    hosts:
      tripleo_compute_node:
        ansible_python_interpreter: /usr/bin/python3
Example default playbook
- name: Converge
  hosts: tripleo_compute_node
  gather_facts: true
  tasks:

    # Needed by tripleo_ssh_known_hosts role which expects the allovercloud
    # group in the inventory.
  - name: Create allovercloud inventory group and add hosts
    ansible.builtin.add_host:
      groups:
      - allovercloud
      - overcloud
      name: tripleo_compute_node
    tags:
    - always

  - name: Set memlock limit to unlimited for iscsid
    shell: |
      {% raw %}
      set -x
      exec 2>&1
      for pid in $(pstree -lps $$ | grep -o '[0-9]*'); do
        sudo prlimit --pid $pid --memlock=unlimited
      done
      ulimit -l
      echo "$USER - memlock unlimited" | sudo tee -a /etc/security/limits.d/tripleo-ansible.conf
      # podman stop tripleo_compute_node
      # podman start tripleo_compute_node
      podman exec -it tripleo_compute_node ulimit -l
      {% endraw %}
    delegate_to: localhost
    register: memlock

  - debug:
      var: memlock.stdout

  - name: Include tripleo_compute_node vars
    include_vars: ../inventory/host_vars/tripleo_compute_node

- import_playbook: ../../../../playbooks/deploy-tripleo-facts.yml
  name: deploy-tripleo-facts.yml
  vars:
    deploy_target_host: tripleo_compute_node
  tags:
  - facts

- import_playbook: ../../../../playbooks/deploy-tripleo-os-install.yml
  name: deploy-tripleo-os-install.yml
  vars:
    deploy_target_host: tripleo_compute_node
  tags:
  - os_install

- import_playbook: ../../../../playbooks/deploy-tripleo-os-configure.yml
  name: deploy-tripleo-os-configure.yml
  vars:
    deploy_target_host: tripleo_compute_node
  tags:
  - os_configure

- import_playbook: ../../../../playbooks/deploy-tripleo-os-run.yml
  name: deploy-tripleo-os-run.yml
  vars:
    deploy_target_host: tripleo_compute_node
  tags:
  - os_run

- import_playbook: ../../../../playbooks/deploy-tripleo-openstack-install.yml
  name: deploy-tripleo-openstack-install.yml
  vars:
    deploy_target_host: tripleo_compute_node
  tags:
  - openstack_install

- import_playbook: ../../../../playbooks/deploy-tripleo-openstack-configure.yml
  name: deploy-tripleo-openstack-configure.yml
  vars:
    deploy_target_host: tripleo_compute_node
    tripleo_nova_compute_config_overrides:
      default:
        transport_url: rabbit://
      oslo_messaging_notifications:
        transport_url: rabbit://
  tags:
  - openstack_configure

- import_playbook: ../../../../playbooks/deploy-tripleo-openstack-run.yml
  name: deploy-tripleo-openstack-run.yml
  vars:
    deploy_target_host: tripleo_compute_node
    tripleo_logrotate_crond_podman_pid: private
    tripleo_nova_libvirt_container_pid: private
  tags:
  - openstack_run