summaryrefslogtreecommitdiffstats
path: root/mcp/reclass/classes/cluster/baremetal-mcp-pike-odl-ha/openstack
ModeNameSize
-rw-r--r--compute.yml1228logstatsplain
-rw-r--r--compute_pdf.yml.j23127logstatsplain
-rw-r--r--control.yml789logstatsplain
-rw-r--r--database.yml640logstatsplain
-rw-r--r--init.yml1374logstatsplain
-rw-r--r--message_queue.yml645logstatsplain
-rw-r--r--proxy.yml1421logstatsplain
-rw-r--r--telemetry.yml647logstatsplain
} /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
---
- name: Configuration to be applied before rebooting the node
  connection: local
  hosts: localhost

  tasks:
    # Kernel Args Configuration
    - block:
        - name: Ensure the kernel args ( {{ _KERNEL_ARGS_ }} ) is present as TRIPLEO_HEAT_TEMPLATE_KERNEL_ARGS
          lineinfile:
            dest: /etc/default/grub
            regexp: '^TRIPLEO_HEAT_TEMPLATE_KERNEL_ARGS.*'
            insertafter: '^GRUB_CMDLINE_LINUX.*'
            line: 'TRIPLEO_HEAT_TEMPLATE_KERNEL_ARGS=" {{ _KERNEL_ARGS_ }} "'
        - name: Add TRIPLEO_HEAT_TEMPLATE_KERNEL_ARGS to the GRUB_CMDLINE_LINUX parameter
          lineinfile:
            dest: /etc/default/grub
            line: 'GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX:+$GRUB_CMDLINE_LINUX }${TRIPLEO_HEAT_TEMPLATE_KERNEL_ARGS}"'
            insertafter: '^TRIPLEO_HEAT_TEMPLATE_KERNEL_ARGS.*'
        - name: Generate grub config file
          command: grub2-mkconfig -o /boot/grub2/grub.cfg
      become: true
      when: _KERNEL_ARGS_|default("") != ""

    # Tune-d Configuration
    - block:
        - name: Tune-d Configuration
          lineinfile:
            dest: /etc/tuned/cpu-partitioning-variables.conf
            regexp: '^isolated_cores=.*'
            line: 'isolated_cores={{ _TUNED_CORES_ }}'
          when: _TUNED_CORES_|default("") != ""

        - name: Tune-d profile activation
          shell: tuned-adm profile {{ _TUNED_PROFILE_NAME_ }}
      become: true
      when: _TUNED_PROFILE_NAME_|default("") != ""

    # Provisioning Network workaround
    # The script will be executed before os-net-config, in which case, only Provisioning network will have IP
    # BOOTPROTO of all interface config files (except provisioning), will be set to "none" to avoid reboot failing to acquire IP on other networks
    - block:
      - find:
          paths: /etc/sysconfig/network-scripts/
          patterns: ifcfg-*
        register: ifcfg_files

      - replace:
          dest: "{{ item.path }}"
          regexp: '^BOOTPROTO=.*'
          replace: 'BOOTPROTO=none'
        when:
          - item.path | regex_replace('(^.*ifcfg-)(.*)', '\\2') != "lo"
          # This condition will list all the interfaces except the one with valid IP (which is Provisioning network at this stage)
          # Simpler Version - hostvars[inventory_hostname]['ansible_' + iface_name ]['ipv4'] is undefined
          - hostvars[inventory_hostname]['ansible_' + item.path | regex_replace('(^.*ifcfg-)(.*)', '\\2') ]['ipv4'] is undefined
        with_items:
          - "{{ ifcfg_files.files }}"