diff --git a/vendor/github.com/performancecopilot/ansible-pcp/.github/dependabot.yml b/vendor/github.com/performancecopilot/ansible-pcp/.github/dependabot.yml new file mode 100644 index 00000000..72125286 --- /dev/null +++ b/vendor/github.com/performancecopilot/ansible-pcp/.github/dependabot.yml @@ -0,0 +1,9 @@ +--- +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly + commit-message: + prefix: ci diff --git a/vendor/github.com/performancecopilot/ansible-pcp/.github/workflows/ansible-lint.yml b/vendor/github.com/performancecopilot/ansible-pcp/.github/workflows/ansible-lint.yml index 745f202d..680728e8 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/.github/workflows/ansible-lint.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/.github/workflows/ansible-lint.yml @@ -1,28 +1,37 @@ --- name: Ansible Lint on: # yamllint disable-line rule:truthy + merge_group: + branches: + - main + types: + - checks_requested pull_request: push: branches: - main workflow_dispatch: +env: + LSR_ROLE2COLL_NAMESPACE: performancecopilot + LSR_ROLE2COLL_NAME: metrics + TOX_WORK_DIR: .tox +permissions: + contents: read jobs: ansible_lint: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v3 - - name: Fix up role meta/main.yml namespace and name + uses: actions/checkout@v4 + - name: Convert role to collection format run: | set -euxo pipefail - mm=meta/main.yml - if [ -f "$mm" ]; then - if ! grep -q '^ *namespace:' "$mm"; then - sed "/galaxy_info:/a\ namespace: performancecopilot" -i "$mm" - fi - if ! grep -q '^ *role_name:' "$mm"; then - sed "/galaxy_info:/a\ role_name: metrics" -i "$mm" - fi - fi + coll_dir="$TOX_WORK_DIR/ansible_collections/${{ env.LSR_ROLE2COLL_NAMESPACE }}/${{ env.LSR_ROLE2COLL_NAME }}" + bash scripts/lsrcollection.sh + # ansible-lint action requires a .git directory??? + # https://github.com/ansible/ansible-lint/blob/main/action.yml#L45 + mkdir -p "$coll_dir/.git" - name: Run ansible-lint - uses: ansible-community/ansible-lint-action@v6 + uses: ansible/ansible-lint@v6 + with: + working_directory: ${{ env.TOX_WORK_DIR }}/ansible_collections/${{ env.LSR_ROLE2COLL_NAMESPACE }}/${{ env.LSR_ROLE2COLL_NAME }} diff --git a/vendor/github.com/performancecopilot/ansible-pcp/.github/workflows/commitlint.yml b/vendor/github.com/performancecopilot/ansible-pcp/.github/workflows/commitlint.yml index d43381dc..a52dbb7b 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/.github/workflows/commitlint.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/.github/workflows/commitlint.yml @@ -18,7 +18,7 @@ jobs: commit-checks: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/vendor/github.com/performancecopilot/ansible-pcp/.github/workflows/tox.yml b/vendor/github.com/performancecopilot/ansible-pcp/.github/workflows/tox.yml index fa711314..1deebab4 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/.github/workflows/tox.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/.github/workflows/tox.yml @@ -24,9 +24,9 @@ jobs: runs-on: ${{ matrix.pyver_os.os }} steps: - name: checkout PR - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.pyver_os.ver }} - name: Install platform dependencies, python, tox, tox-lsr diff --git a/vendor/github.com/performancecopilot/ansible-pcp/.github/workflows/woke.yml b/vendor/github.com/performancecopilot/ansible-pcp/.github/workflows/woke.yml index f1476dc7..d6e5fb19 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/.github/workflows/woke.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/.github/workflows/woke.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: woke uses: get-woke/woke-action@v0 diff --git a/vendor/github.com/performancecopilot/ansible-pcp/meta/runtime.yml b/vendor/github.com/performancecopilot/ansible-pcp/meta/runtime.yml index e58298b0..b9ac073a 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/meta/runtime.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/meta/runtime.yml @@ -1,3 +1,3 @@ # SPDX-License-Identifier: MIT --- -requires_ansible: ">=2.11.0" +requires_ansible: ">=2.13.0" diff --git a/vendor/github.com/performancecopilot/ansible-pcp/roles/bpftrace/tasks/main.yml b/vendor/github.com/performancecopilot/ansible-pcp/roles/bpftrace/tasks/main.yml index d8c1f0f3..6ca422b9 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/roles/bpftrace/tasks/main.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/roles/bpftrace/tasks/main.yml @@ -58,13 +58,13 @@ file: path: "{{ __bpftrace_conf_dir }}" state: directory - mode: 0755 + mode: "0755" when: bpftrace_metrics_provider == 'pcp' - name: Ensure PCP bpftrace agent is configured template: src: bpftrace.conf.j2 dest: "{{ __bpftrace_conf }}" - mode: 0600 + mode: "0600" follow: true when: bpftrace_metrics_provider == 'pcp' diff --git a/vendor/github.com/performancecopilot/ansible-pcp/roles/elasticsearch/README.md b/vendor/github.com/performancecopilot/ansible-pcp/roles/elasticsearch/README.md index 1f6a15bc..adc3aad8 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/roles/elasticsearch/README.md +++ b/vendor/github.com/performancecopilot/ansible-pcp/roles/elasticsearch/README.md @@ -8,43 +8,43 @@ Uses features of PCP v5.2.1 and later. ## Role Variables -### elasticsearch_agent: true + elasticsearch_agent: true Collect metrics from the local Elasticsearch server. -### elasticsearch_agent_port: 9200 + elasticsearch_agent_port: 9200 Connect on given socket port for Elasticsearch metric collection. -### elasticsearch_agent_authname: '' + elasticsearch_agent_authname: '' Sets the HTTP request username for Elasticsearch metric collection. -### elasticsearch_agent_password: '' + elasticsearch_agent_password: '' Sets the HTTP request password for Elasticsearch metric collection. -### elasticsearch_export_metrics: false + elasticsearch_export_metrics: false Enable exporting of PCP metrics metadata and values to Elasticsearch. -### elasticsearch_export_interval: 60 + elasticsearch_export_interval: 60 Sets the sampling interval for exporting metric values to Elasticsearch, in seconds. -### elasticsearch_export_server: 'http://localhost:9200' + elasticsearch_export_server: 'http://localhost:9200' Elasticsearch server URL for PCP metric metadata and value exporting. -### elasticsearch_export_index: pcp + elasticsearch_export_index: pcp Elasticsearch index to use for PCP metric names. -### elasticsearch_export_hostid: [] + elasticsearch_export_hostid: [] Specify the Elasticsearch host-id for measurements, default is the PCP metrics source hostname. -### elasticsearch_export_type: pcp-metric + elasticsearch_export_type: pcp-metric Specify the Elasticsearch search type for measurements. diff --git a/vendor/github.com/performancecopilot/ansible-pcp/roles/elasticsearch/tasks/main.yml b/vendor/github.com/performancecopilot/ansible-pcp/roles/elasticsearch/tasks/main.yml index 95b4c9f1..00d9374b 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/roles/elasticsearch/tasks/main.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/roles/elasticsearch/tasks/main.yml @@ -52,7 +52,7 @@ file: path: "{{ __elasticsearch_conf_dir }}" state: directory - mode: 0755 + mode: "0755" when: elasticsearch_metrics_provider == 'pcp' - name: Ensure PCP Elasticsearch agent is configured @@ -60,7 +60,7 @@ src: elasticsearch.conf.j2 dest: "{{ __elasticsearch_conf }}" follow: true - mode: 0600 + mode: "0600" when: - elasticsearch_metrics_provider == 'pcp' - elasticsearch_agent | d(false) | bool @@ -76,7 +76,7 @@ template: src: pcp2elasticsearch.service.j2 dest: "{{ __elasticsearch_service_path }}/pcp2elasticsearch.service" - mode: 0600 + mode: "0600" when: - elasticsearch_metrics_provider == 'pcp' - elasticsearch_export_metrics | d(false) | bool diff --git a/vendor/github.com/performancecopilot/ansible-pcp/roles/grafana/tasks/main.yml b/vendor/github.com/performancecopilot/ansible-pcp/roles/grafana/tasks/main.yml index a7224774..336a4313 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/roles/grafana/tasks/main.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/roles/grafana/tasks/main.yml @@ -42,7 +42,7 @@ template: src: grafana_7.ini.j2 dest: "{{ __grafana_conf }}" - mode: 0640 + mode: "0640" notify: Restart grafana when: grafana_version is version('9.0.0', '<') @@ -50,7 +50,7 @@ template: src: grafana_9.ini.j2 dest: "{{ __grafana_conf }}" - mode: 0640 + mode: "0640" notify: Restart grafana when: grafana_version is version('9.0.0', '>=') @@ -60,14 +60,13 @@ state: directory group: grafana owner: root - mode: 0750 + mode: "0750" - name: Ensure Grafana service is configured with datasources template: src: grafana-pcp-datasources.yaml.j2 dest: "{{ __grafana_provisioning_path }}/datasources/grafana-pcp.yaml" - - mode: 0644 + mode: "0644" notify: Restart grafana - name: Ensure graphing service is running and enabled on boot @@ -94,5 +93,5 @@ dest: "{{ __grafana_provisioning_path }}/plugins/grafana-pcp.yaml" owner: root group: grafana - mode: '0640' + mode: "0640" when: grafana_version is version('7.5.0', '>=') diff --git a/vendor/github.com/performancecopilot/ansible-pcp/roles/mssql/README.md b/vendor/github.com/performancecopilot/ansible-pcp/roles/mssql/README.md index a7e7e0c3..4ed1a6cc 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/roles/mssql/README.md +++ b/vendor/github.com/performancecopilot/ansible-pcp/roles/mssql/README.md @@ -10,19 +10,19 @@ The SQL Server metrics are available from PCP v5.2 and later. ## Role Variables -### mssql_agent_trusted: true + mssql_agent_trusted: true Connect to SQL Server using [Windows Authentication mode](https://docs.microsoft.com/en-us/sql/relational-databases/security/choose-an-authentication-mode?view=sql-server-ver15#connecting-through-windows-authentication) -### mssql_agent_username: sa + mssql_agent_username: sa Connect to SQL server using [SQL Server Authentication mode](https://docs.microsoft.com/en-us/sql/relational-databases/security/choose-an-authentication-mode?view=sql-server-ver15#connecting-through-sql-server-authentication). This is mutually exclusive with the mssql_agent_trusted authentication mode. -### mssql_agent_password: admin + mssql_agent_password: admin Sets the pass phrase associated with mssql_agent_username, for use when connecting with SQL Server Authentication mode (only). -### mssql_agent_timeout: 2 + mssql_agent_timeout: 2 Close the connection to SQL Server if a response is not received within this number of seconds. Subsequent requests will result in attempts to reestablish a connection. diff --git a/vendor/github.com/performancecopilot/ansible-pcp/roles/mssql/tasks/main.yml b/vendor/github.com/performancecopilot/ansible-pcp/roles/mssql/tasks/main.yml index 15f0adfb..822c5fb3 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/roles/mssql/tasks/main.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/roles/mssql/tasks/main.yml @@ -41,7 +41,7 @@ file: path: "{{ __mssql_conf_dir }}" state: directory - mode: 0755 + mode: "0755" when: mssql_metrics_provider == 'pcp' - name: Ensure PCP SQL Server agent is configured @@ -49,7 +49,7 @@ src: mssql.conf.j2 dest: "{{ __mssql_conf }}" follow: true - mode: 0600 + mode: "0600" when: mssql_metrics_provider == 'pcp' - name: Ensure SQL Server performance rule group directory exists @@ -58,7 +58,7 @@ state: directory owner: root group: root - mode: 0755 + mode: "0755" when: mssql_metrics_provider == 'pcp' - name: Ensure SQL Server performance rule group link directory exists @@ -67,7 +67,7 @@ state: directory owner: root group: root - mode: 0755 + mode: "0755" when: mssql_metrics_provider == 'pcp' - name: Ensure SQL Server performance rules are installed for targeted hosts @@ -76,7 +76,7 @@ dest: "{{ __mssql_pmieconf_path }}/{{ item }}" owner: root group: root - mode: '0644' + mode: "0644" loop: "{{ __mssql_pmieconf_rules | default([]) }}" when: mssql_metrics_provider == 'pcp' diff --git a/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/README.md b/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/README.md index 7a4c95fa..f6ecfe72 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/README.md +++ b/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/README.md @@ -8,51 +8,51 @@ Uses features of PCP v5 and later. ## Role Variables -### pcp_rest_api: true + pcp_rest_api: true Enable the PCP REST APIs and log discovery via the [pmproxy(1)](http://man7.org/linux/man-pages/man1/pmproxy.1.html) service. Default: false. -### pcp_pmlogger_interval: 60 + pcp_pmlogger_interval: 60 Default logging interval for [pmlogger(1)](http://man7.org/linux/man-pages/man1/pmlogger.1.html) archives for logging groups that do not set an explicit sampling interval. -### pcp_pmlogger_discard: 14 + pcp_pmlogger_discard: 14 After some period, old PCP archives are discarded. This period is 14 days by default, but may be changed using this variable. Some special values are recognized for the period, namely '0' to keep no archives beyond the current one, and 'forever' or never to prevent any archives being discarded. Note that the semantics of discard are that it is measured from the time of last modification of each archive, and not from the current day. -### pcp_archive_dir: /var/log/pcp/pmlogger + pcp_archive_dir: /var/log/pcp/pmlogger Default location for [pmlogger(1)](http://man7.org/linux/man-pages/man1/pmlogger.1.html) archives, per-host directories containing daily performance metric archives will be created here when pmlogger is enabled. When [pmproxy(1)](http://man7.org/linux/man-pages/man1/pmproxy.1.html) is running with archive discovery enabled, it monitors this location. -### pcp_target_hosts: [] + pcp_target_hosts: [] An optional list of remote hostnames for which metric recording and inference rules should be installed, to be monitored from the host running the playbook. By default, all performance rules evaluating to true will be logged to the local system log (for both the local host and remote hosts in the target hosts list), and daily archives will be created below *pcp_archive_dir*/*hostname* locally, again for each host listed in the target hosts list. -### pcp_pmie_endpoint: '' + pcp_pmie_endpoint: '' Send inference events to the given webhook endpoint (URL) from [pmie(1)](http://man7.org/linux/man-pages/man1/pmie.1.html) performance rules. The default is to log these events into the local system log only. -### pcp_single_control: 0 + pcp_single_control: 0 Specifies whether the pcp_target_hosts configuration file(s) for pmie and pmlogger are in control.d form (the default) or in the single file form where /*etc*/*pcp*/*pmlogger*/*control* and /*etc*/*pcp*/*pmie*/*control* are used to setup the target hosts list for monitoring. -### pcp_pmcd_localonly: 0 + pcp_pmcd_localonly: 0 Enable remote host connections to the [pmcd(1)](http://man7.org/linux/man-pages/man1/pmcd.1.html) service. This affects most PMAPI client tools accessing live data such as including *pmlogger*, *pmchart*, *pmrep*, *pmie*, *pcp-dstat*, and so on -### pcp_pmproxy_localonly: 0 + pcp_pmproxy_localonly: 0 Enable remote host connections to the [pmproxy(1)](http://man7.org/linux/man-pages/man1/pmproxy.1.html) service. This affects client tools using the REST API such as [grafana-pcp](https://grafana-pcp.readthedocs.io/) and PMAPI client tools using the protocol proxying features of *pmproxy*. -### pcp_pmlogger_localonly: 1 + pcp_pmlogger_localonly: 1 Enable remote host connections to the [pmlogger(1)](http://man7.org/linux/man-pages/man1/pmlogger.1.html) service. This affects the optional [pmlc(1)](http://man7.org/linux/man-pages/man1/pmlc.1.html) utility. -### pcp_optional_agents: [] + pcp_optional_agents: [] Additional performance metrics domain agents (PMDAs) that should be installed, beyond the default set, to enable additional metrics. The array provided should contain shortened names for each PMDA to be enabled, such as "kvm". -### pcp_optional_packages: [] + pcp_optional_packages: [] Additional PCP packages that should be installed, beyond the default set, to enable additional metrics, export to alternate data sinks, and so on. diff --git a/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/tasks/pmcd.yml b/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/tasks/pmcd.yml index 3bddf3f7..7c755338 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/tasks/pmcd.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/tasks/pmcd.yml @@ -24,7 +24,7 @@ file: path: "{{ __pcp_explicit_labels_path }}" state: directory - mode: 0755 + mode: "0755" owner: root group: root @@ -32,7 +32,7 @@ file: path: "{{ __pcp_implicit_labels_path }}" state: directory - mode: 0755 + mode: "0755" owner: root group: root @@ -40,21 +40,21 @@ template: src: pmcd.explicit.labels.j2 dest: "{{ __pcp_explicit_labels_path }}/ansible-managed" - mode: 0644 + mode: "0644" register: __pcp_register_changed_explicit_labels - name: Ensure any implicit metric labels are configured template: src: pmcd.implicit.labels.j2 dest: "{{ __pcp_implicit_labels_path }}/ansible-managed" - mode: 0644 + mode: "0644" register: __pcp_register_changed_implicit_labels - name: Ensure performance metric collector is configured template: src: pmcd.defaults.j2 dest: "{{ __pcp_pmcd_defaults_path }}" - mode: 0644 + mode: "0644" register: __pcp_register_changed_defaults_config - name: Ensure performance metric collector system accounts are configured @@ -87,7 +87,7 @@ template: src: pmcd.sasl2.conf.j2 dest: "{{ __pcp_pmcd_saslconf_path }}" - mode: 0644 + mode: "0644" register: __pcp_register_changed_authentication when: pcp_accounts | d([]) diff --git a/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/tasks/pmie.yml b/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/tasks/pmie.yml index 3502b1ab..9286b6b4 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/tasks/pmie.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/tasks/pmie.yml @@ -7,7 +7,7 @@ state: directory owner: root group: root - mode: 0755 + mode: "0755" loop: "{{ __pcp_pmieconf_groups | default([]) }}" register: __pcp_register_changed_group_dir @@ -17,7 +17,7 @@ state: directory owner: root group: root - mode: 0755 + mode: "0755" loop: "{{ __pcp_pmieconf_groups | default([]) }}" register: __pcp_register_changed_group_link_dir @@ -27,7 +27,7 @@ dest: "{{ __pcp_pmieconf_path }}/{{ item }}" owner: root group: root - mode: '0644' + mode: "0644" loop: "{{ __pcp_pmieconf_rules | default([]) }}" register: __pcp_register_changed_rules_for_hosts @@ -96,7 +96,7 @@ template: src: pmie.controld.j2 dest: "{{ __pcp_pmie_control_d_path }}/{{ item }}" - mode: 0644 + mode: "0644" loop: "{{ pcp_target_hosts | default([]) }}" register: __pcp_register_changed_target_hosts_controld when: @@ -107,7 +107,7 @@ template: src: pmie.control.j2 dest: "{{ __pcp_pmie_control_path }}" - mode: 0644 + mode: "0644" register: __pcp_register_changed_target_hosts_single when: - pcp_single_control | d(true) | bool diff --git a/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/tasks/pmlogger.yml b/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/tasks/pmlogger.yml index c3b172bc..80e0c9a9 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/tasks/pmlogger.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/tasks/pmlogger.yml @@ -13,14 +13,14 @@ template: src: pmlogger.defaults.j2 dest: "{{ __pcp_pmlogger_defaults_path }}" - mode: 0644 + mode: "0644" register: __pcp_register_changed_config_pmlogger - name: Ensure performance metric logging retention period is set template: src: pmlogger.timers.j2 dest: "{{ __pcp_pmlogger_timers_path }}" - mode: 0644 + mode: "0644" register: __pcp_register_changed_logging_retention_period notify: Restart pmlogger @@ -28,7 +28,7 @@ template: src: pmlogger.controld.j2 dest: "{{ __pcp_pmlogger_control_d_path }}/{{ item }}" - mode: 0644 + mode: "0644" loop: "{{ pcp_target_hosts | default([]) }}" register: __pcp_register_changed_targeted_hosts_controld notify: Restart pmlogger @@ -40,7 +40,7 @@ template: src: pmlogger.control.j2 dest: "{{ __pcp_pmlogger_control_path }}" - mode: 0644 + mode: "0644" register: __pcp_register_changed_targeted_hosts_single when: - pcp_single_control | d(true) | bool diff --git a/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/tasks/pmproxy.yml b/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/tasks/pmproxy.yml index 37b69cb4..9233f229 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/tasks/pmproxy.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/roles/pcp/tasks/pmproxy.yml @@ -5,7 +5,7 @@ template: src: pmproxy.defaults.j2 dest: "{{ __pcp_pmproxy_defaults_path }}" - mode: 0644 + mode: "0644" notify: Restart pmproxy - name: Ensure REST API, proxy and log discovery is running and enabled on boot diff --git a/vendor/github.com/performancecopilot/ansible-pcp/roles/redis/README.md b/vendor/github.com/performancecopilot/ansible-pcp/roles/redis/README.md index 96d6db6f..574359b9 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/roles/redis/README.md +++ b/vendor/github.com/performancecopilot/ansible-pcp/roles/redis/README.md @@ -8,7 +8,7 @@ Uses features of Redis v5+. If the target platform provides it, the RediSearch ## Role Variables -### redis_save_to_disk: true + redis_save_to_disk: true Incrementally save the redis database to disk. Default: true. diff --git a/vendor/github.com/performancecopilot/ansible-pcp/roles/redis/tasks/main.yml b/vendor/github.com/performancecopilot/ansible-pcp/roles/redis/tasks/main.yml index 9603c7f6..7321af27 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/roles/redis/tasks/main.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/roles/redis/tasks/main.yml @@ -37,14 +37,14 @@ state: directory owner: redis group: root - mode: 0750 + mode: "0750" # yamllint disable rule:line-length - name: Ensure Redis service is configured template: src: "{{ item }}" dest: "{{ __redis_conf_path }}/{{ __redis_conf_file }}" - mode: 0640 + mode: "0640" owner: redis group: root with_first_found: diff --git a/vendor/github.com/performancecopilot/ansible-pcp/roles/repository/tasks/main.yml b/vendor/github.com/performancecopilot/ansible-pcp/roles/repository/tasks/main.yml index 3bf784f7..100b4712 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/roles/repository/tasks/main.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/roles/repository/tasks/main.yml @@ -16,7 +16,7 @@ template: src: artifactory.rpms.j2 dest: /etc/yum.repos.d/performancecopilot.repo - mode: 0600 + mode: "0600" when: - ansible_facts['os_family'] == 'RedHat' @@ -24,6 +24,6 @@ file: src: artifactory.debs.j2 dest: /etc/apt/sources.list.d/performancecopilot.sources - mode: 0600 + mode: "0600" when: - ansible_facts['os_family'] == 'Debian' diff --git a/vendor/github.com/performancecopilot/ansible-pcp/roles/spark/tasks/main.yml b/vendor/github.com/performancecopilot/ansible-pcp/roles/spark/tasks/main.yml index 6139a9f7..a65dff49 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/roles/spark/tasks/main.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/roles/spark/tasks/main.yml @@ -52,7 +52,7 @@ template: src: spark.url.j2 dest: "{{ __spark_metrics_conf }}" - mode: 0600 + mode: "0600" when: - spark_metrics_provider == 'pcp' - spark_metrics_agent | d(false) | bool @@ -77,7 +77,7 @@ template: src: pcp2spark.service.j2 dest: "{{ __spark_service_path }}/pcp2spark.service" - mode: 0600 + mode: "0600" when: - spark_metrics_provider == 'pcp' - spark_export_metrics | d(false) | bool diff --git a/vendor/github.com/performancecopilot/ansible-pcp/scripts/lsrcollection.sh b/vendor/github.com/performancecopilot/ansible-pcp/scripts/lsrcollection.sh index f6da4c91..f7e335eb 100755 --- a/vendor/github.com/performancecopilot/ansible-pcp/scripts/lsrcollection.sh +++ b/vendor/github.com/performancecopilot/ansible-pcp/scripts/lsrcollection.sh @@ -3,4 +3,4 @@ TOPDIR=$(pwd) LSRDIR="ansible_collections/$LSR_ROLE2COLL_NAMESPACE/$LSR_ROLE2COLL_NAME" mkdir -p "$TOX_WORK_DIR/$LSRDIR" -cp -a "$TOPDIR"/* "$TOX_WORK_DIR/$LSRDIR" +cp -a "$TOPDIR"/* "$TOPDIR/.ansible-lint" "$TOX_WORK_DIR/$LSRDIR" diff --git a/vendor/github.com/performancecopilot/ansible-pcp/tests/check_pmie_webhook.yml b/vendor/github.com/performancecopilot/ansible-pcp/tests/check_pmie_webhook.yml new file mode 100644 index 00000000..084a24bb --- /dev/null +++ b/vendor/github.com/performancecopilot/ansible-pcp/tests/check_pmie_webhook.yml @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: MIT +--- +- name: Check if primary pmie is running + changed_when: false + shell: | + set -eu + if set -o | grep -q pipefail; then + set -o pipefail # no pipefail on debian, some ubuntu + fi + pmprobe -I pmcd.pmie.pmcd_host | grep '"primary"' + when: (ansible_facts['distribution'] in ['RedHat', 'CentOS'] and + ansible_facts['distribution_major_version'] | int > 6) or + ansible_facts['distribution'] not in ['Fedora', 'RedHat', 'CentOS'] + +# yamllint disable rule:line-length +- name: Check if primary pmie uses webhook + changed_when: false + shell: | + set -eu + if set -o | grep -q pipefail; then + set -o pipefail # no pipefail on debian, some ubuntu + fi + pmieconf -f /var/lib/pcp/config/pmie/config.default list global webhook_endpoint | grep '"example"' + pmieconf -f /var/lib/pcp/config/pmie/config.default list global webhook_action | grep '"yes"' + when: (ansible_distribution in ['RedHat', 'CentOS'] and + (ansible_facts['distribution_version'] is version('9.3', '<'))) or + ansible_distribution not in ['Fedora', 'RedHat', 'CentOS'] +# yamllint enable rule:line-length diff --git a/vendor/github.com/performancecopilot/ansible-pcp/tests/tests_verify_mssql.yml b/vendor/github.com/performancecopilot/ansible-pcp/tests/tests_verify_mssql.yml index b7b984ad..3f3ab2da 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/tests/tests_verify_mssql.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/tests/tests_verify_mssql.yml @@ -20,10 +20,24 @@ - name: Save state of services import_tasks: get_services_state.yml + - name: Determine if system is ostree and set flag + when: not __ansible_pcp_is_ostree is defined + block: + - name: Check if system is ostree + stat: + path: /run/ostree-booted + register: __ostree_booted_stat + + - name: Set flag to indicate system is ostree + set_fact: + __ansible_pcp_is_ostree: "{{ __ostree_booted_stat.stat.exists }}" + - name: Ensure python3-pyodbc is installed package: name: python3-pyodbc state: present + use: "{{ (__ansible_pcp_is_ostree | d(false)) | + ternary('ansible.posix.rhel_rpm_ostree', omit) }}" tasks: - name: Check MSSQL functionality diff --git a/vendor/github.com/performancecopilot/ansible-pcp/tests/tests_verify_pmie_webhook.yml b/vendor/github.com/performancecopilot/ansible-pcp/tests/tests_verify_pmie_webhook.yml new file mode 100644 index 00000000..926b91d6 --- /dev/null +++ b/vendor/github.com/performancecopilot/ansible-pcp/tests/tests_verify_pmie_webhook.yml @@ -0,0 +1,27 @@ +# SPDX-License-Identifier: MIT +--- +- name: Test pmie webhook configuration + hosts: all + + roles: + - role: performancecopilot.metrics.pcp + vars: + pcp_pmie_endpoint: https://example.com:12345/webhook + + pre_tasks: + - name: Skip test if not supported by platform + meta: end_host + when: (ansible_distribution in ['RedHat', 'CentOS'] and + (ansible_facts['distribution_version'] is version('9.3', '<'))) or + ansible_distribution not in ['Fedora', 'RedHat', 'CentOS'] + + - name: Save state of services + import_tasks: get_services_state.yml + + tasks: + - name: Check if configuring pmie webhook works + include_tasks: check_pmie_webhook.yml + + post_tasks: + - name: Restore state of services + import_tasks: restore_services_state.yml diff --git a/vendor/github.com/performancecopilot/ansible-pcp/tests/tests_verify_postfix.yml b/vendor/github.com/performancecopilot/ansible-pcp/tests/tests_verify_postfix.yml index 3eef54bc..1bd10b90 100644 --- a/vendor/github.com/performancecopilot/ansible-pcp/tests/tests_verify_postfix.yml +++ b/vendor/github.com/performancecopilot/ansible-pcp/tests/tests_verify_postfix.yml @@ -13,10 +13,24 @@ - name: Save state of services import_tasks: get_services_state.yml + - name: Determine if system is ostree and set flag + when: not __ansible_pcp_is_ostree is defined + block: + - name: Check if system is ostree + stat: + path: /run/ostree-booted + register: __ostree_booted_stat + + - name: Set flag to indicate system is ostree + set_fact: + __ansible_pcp_is_ostree: "{{ __ostree_booted_stat.stat.exists }}" + - name: Ensure Postfix is installed package: name: postfix state: present + use: "{{ (__ansible_pcp_is_ostree | d(false)) | + ternary('ansible.posix.rhel_rpm_ostree', omit) }}" tasks: - name: Check Postfix functionality