Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Import code for role #3

Merged
merged 12 commits into from
Nov 12, 2024
Merged

Conversation

radosroka
Copy link
Collaborator

@radosroka radosroka commented Oct 28, 2024

Enhancement: Add initial code for the aide system role

Signed-off-by: Radovan Sroka <[email protected]>
tasks/main.yml Show resolved Hide resolved
tasks/main.yml Outdated Show resolved Hide resolved
pylint_extra_requirements.txt Outdated Show resolved Hide resolved
pytest_extra_requirements.txt Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
templates/aide.conf.j2 Outdated Show resolved Hide resolved
templates/aide.conf.j2 Outdated Show resolved Hide resolved
Signed-off-by: Radovan Sroka <[email protected]>
@radosroka
Copy link
Collaborator Author

[citest]

@radosroka
Copy link
Collaborator Author

[citest]

@radosroka
Copy link
Collaborator Author

[citest]

README.md Outdated
```
### aide_generate_config

Generates the file `/etc/aide.conf` using `templates/aide.conf.j2`; the template needs to be adjusted to fit your requirements; if you do not use this varable the default configuration file shipped with the `aide` package will be used.
Copy link
Contributor

@richm richm Nov 7, 2024

Choose a reason for hiding this comment

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

the template needs to be adjusted to fit your requirements;

What does this mean? Note that, in general, users will not be able to modify the template file. Was this in the original role? If so, then I guess that use case was different i.e. as a consultant, I need to install this role in a writable directory on the customers machine and modify and run the role as I require for my particular use case. This is definitely not the linux system roles use case, where the only thing the user may do is modify the inventory and the playbook, and provide files/templates - nothing else.

If we really want users to be able to provide custom configuration, then we should do either/both of these things:

  1. Users can provide a list of configuration parameters that are written in the template
  2. Users can provide their own aide.conf file or template

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the template needs to be adjusted to fit your requirements;

What does this mean? Note that, in general, users will not be able to modify the template file. Was this in the original role? If so, then I guess that use case was different i.e. as a consultant, I need to install this role in a writable directory on the customers machine and modify and run the role as I require for my particular use case. This is definitely not the linux system roles use case, where the only thing the user may do is modify the inventory and the playbook, and provide files/templates - nothing else.

If we really want users to be able to provide custom configuration, then we should do either/both of these things:

1. Users can provide a list of configuration parameters that are written in the template

2. Users can provide their own `aide.conf` file or template

Yeah, as you pointed out, this was designed originally for different use case. Let me evaluate options.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In case user provides aide.conf should we prepend ansible_managed comment?

Copy link
Contributor

Choose a reason for hiding this comment

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

In case user provides aide.conf should we prepend ansible_managed comment?

No - if the user provides the file, it is the responsibility of the user to mark the file as Ansible managed - this is the way all other system roles work

@radosroka
Copy link
Collaborator Author

@richm do you know why the tests are skipped after [citest]?

meta/main.yml Outdated
- fedora
- all

galaxy_tags: []
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. all is not a valid specifier under EL - you must specify the major versions explicitly - so if aide is supported on EL 9 and 10, you must use
    - name: EL
      versions:
        - "9"
        - "10"
  1. We have to use galaxy_tags now to specify platform support - support for platforms: is being deprecated - see fix: add support for EL10 .github#63 for additional information - this is why the template has explicit galaxy_tags - so if the aide role supports EL 9, 10, and Fedora, you need to have galaxy_tags like this:
  galaxy_tags:
    - el9
    - el10
    - fedora

@richm
Copy link
Contributor

richm commented Nov 7, 2024

@richm do you know why the tests are skipped after [citest]?

Yes - the platforms and galaxy_tags in meta/main.yml need to be fixed - see https://github.com/linux-system-roles/aide/pull/3/files#r1832783551

@richm
Copy link
Contributor

richm commented Nov 7, 2024

I don't know what ansible-lint is complaining about - just ignore it for now

@radosroka
Copy link
Collaborator Author

[citest]

@richm
Copy link
Contributor

richm commented Nov 7, 2024

Looks like Testing Farm is having some issues right now

@richm
Copy link
Contributor

richm commented Nov 7, 2024

[citest]

Signed-off-by: Radovan Sroka <[email protected]>
@radosroka
Copy link
Collaborator Author

[citest]

@radosroka radosroka changed the title [WIP] feat: Import code for role feat: Import code for role Nov 8, 2024
meta/main.yml Outdated Show resolved Hide resolved
tasks/main.yml Outdated Show resolved Hide resolved
tasks/main.yml Outdated Show resolved Hide resolved
tasks/main.yml Outdated Show resolved Hide resolved
tasks/main.yml Outdated Show resolved Hide resolved
@radosroka
Copy link
Collaborator Author

[citest]

2 similar comments
@radosroka
Copy link
Collaborator Author

[citest]

@radosroka
Copy link
Collaborator Author

[citest]

due to broken environment processing in a testing farm

Signed-off-by: Radovan Sroka <[email protected]>
@radosroka
Copy link
Collaborator Author

[citest]

2 similar comments
@radosroka
Copy link
Collaborator Author

[citest]

@radosroka
Copy link
Collaborator Author

[citest]

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
tasks/main.yml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
tasks/main.yml Outdated Show resolved Hide resolved
Signed-off-by: Radovan Sroka <[email protected]>
@radosroka
Copy link
Collaborator Author

[citest]

.github/workflows/tft.yml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
tasks/main.yml Outdated Show resolved Hide resolved
tasks/main.yml Outdated Show resolved Hide resolved
tasks/main.yml Outdated
when:
- aide_db_template is defined
- aide_db_template is not none
- aide_db_template is string

Choose a reason for hiding this comment

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

What else aide_db_template can be? I think this check is not required

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It can be user defined string or null by default.

@radosroka
Copy link
Collaborator Author

[citest]

@spetrosi
Copy link

Signed-off-by: Radovan Sroka <[email protected]>
@spetrosi spetrosi merged commit 68466e7 into linux-system-roles:main Nov 12, 2024
9 checks passed
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