Skip to content

Conversation

guiand888
Copy link

Summary

There are several issues with the playbook at it is:

  • does not follow ansible syntax best practices (linting, FQCN, etc.)
  • implements "playbook" elements into tasks
  • use a script and installation methods that are deprecated

This PR fixes those issues.

Most importantly, it ensure the role remains functional as my-netdata.io/kickstart.sh is deprecated.

Key Changes

Ansible-lint Compliance

  • Fixed 25+ ansible-lint violations across all files
  • Passes production profile with 0 failures, 0 warnings
  • Uses FQCN for all modules (ansible.builtin.*)
  • Proper YAML formatting and ansible best practices

Modern Installation Approach

  • Replaced deprecated netdata-claim.sh script with modern kickstart.sh approach
  • Integrated installation and claiming
  • Intelligent reclaim logic - only uninstall if Netdata exists
  • Resolves repository conflicts during reclaim scenarios

Additional Installation Options

  • netdata_channel: Choose 'stable' or 'nightly' installation
  • netdata_auto_updates: Control automatic updates (default: false for automation)
  • Maintains backward compatibility with existing configurations (reinstall or reclaim)

Improved Structure

  • Created proper playbook.yml with playbook-level elements
  • Remove playbook-level elements for task files
  • Added handlers for service restarts
  • Fixed template variable handling

Usage

ansible-playbook -i hosts playbook.yml

Configuration Examples

# Use nightly channel with auto-updates
netdata_channel: nightly
netdata_auto_updates: true

# Reclaim existing installation
reclaim: true

- Fixed 25 linting violations in ansible-quickstart
- Added proper playbook.yml with FQCN modules
- Converted task files to proper format
- Added handlers and notify statements
…documentation

- Redacted secrets from vars/main.yml (claim_token, claim_rooms)
- Set reclaim back to false and dbengine_multihost_disk_space to 2048
- Added configurable installation options (netdata_channel, netdata_auto_updates)
- Added PR_SUMMARY.md to .gitignore
- Moved detailed ansible instructions to parent README with relative link
- Updated PR summary with comprehensive change documentation
@CLAassistant
Copy link

CLAassistant commented Sep 7, 2025

CLA assistant check
All committers have signed the CLA.

@ilyam8 ilyam8 requested a review from Copilot September 8, 2025 19:23
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the Netdata Ansible quickstart playbook by fixing ansible-lint violations and replacing deprecated installation methods with the current kickstart script approach. The changes ensure compliance with Ansible best practices while maintaining backward compatibility.

Key Changes:

  • Fixed 25+ ansible-lint violations using FQCN and proper YAML formatting
  • Replaced deprecated netdata-claim.sh with modern kickstart.sh that handles both installation and claiming
  • Added proper playbook structure separating playbook-level elements from task files

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vars/main.yml Added new configuration options for installation channel and auto-updates
templates/netdata.conf.j2 Fixed template variable handling with proper Jinja2 syntax
tasks/main.yml Converted import_playbook to import_tasks with proper FQCN
tasks/install.yml Complete rewrite using modern kickstart script with integrated claiming
tasks/configure.yml Streamlined configuration task with proper FQCN and path handling
tasks/claim.yml Simplified to service verification since claiming moved to install
playbook.yml New main playbook file with proper structure and handlers
README.md Updated documentation with comprehensive usage instructions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants