Skip to content

Generate passwords instead of using hard-coded ones#524

Open
evgeni wants to merge 1 commit into
masterfrom
no-changeme
Open

Generate passwords instead of using hard-coded ones#524
evgeni wants to merge 1 commit into
masterfrom
no-changeme

Conversation

@evgeni
Copy link
Copy Markdown
Member

@evgeni evgeni commented May 27, 2026

Why are you introducing these changes? (Problem description, related links)

Generate passwords instead of using hard-coded ones

What are the changes introduced in this pull request?

Generate passwords instead of using hard-coded ones

How to test this pull request

Steps to reproduce:

  • Deploy
  • Ensure no CHANGME passwords/keys are used

Checklist

  • Tests added/updated (if applicable)
  • Documentation updated (if applicable)

Copy link
Copy Markdown
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Neat. Should we document this pattern in developer docs?

@evgeni
Copy link
Copy Markdown
Member Author

evgeni commented May 27, 2026

Neat. Should we document this pattern in developer docs?

I guess that'd be a good idea

Comment thread docs/developer/playbooks-and-roles.md Outdated

```yaml
example_database_password_file: "{{ obsah_state_path }}/example-db-password"
example_database_password: "{{ lookup('ansible.builtin.password', example_database_password_file, chars=['ascii_letters', 'digits']) }}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it possible to turn this into a single filter that enforces this pattern? Or have an Ansible lint rule that enforces it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You mean a lookup(foremanctl_password) that does the right settings for us? Not sure.

But I'll investigate both options

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Okay, a lint rule was reasonably easy, added in #526

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

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.

3 participants