Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

rewrite role to my standard #47

Closed
wants to merge 1 commit into from
Closed

rewrite role to my standard #47

wants to merge 1 commit into from

Conversation

Turgon37
Copy link

No description provided.

@Turgon37 Turgon37 closed this Jul 14, 2018
@Turgon37
Copy link
Author

I'm sorry, I've choose the bad repository :(

@Turgon37 Turgon37 changed the title rewrite role to standard rewrite role to my standard Jul 14, 2018
@paulfantom
Copy link
Member

@Turgon37 actually you have some good ideas which I should implement in this role 👍

@paulfantom
Copy link
Member

And you also have an error in meta/main.yml, unless you really want to name your role role_name: nginx 😄

@Turgon37
Copy link
Author

Yes, I'm fighting with typo to fix theses errors :)

@paulfantom
Copy link
Member

paulfantom commented Jul 14, 2018

A tip: remember that you cannot use - in role names with new ansible galaxy as they will be converted to _.

@paulfantom
Copy link
Member

Also the way you changed service file template will give you a badly rendered file.

@Turgon37
Copy link
Author

thanks for the galaxy tips, but for the service unit file I think it's ok

[Unit]
Description=Prometheus Node Exporter
After=network.target

[Service]
Type=simple
User=node-exporter
Group=node-exporter
Nice=-5
ExecStart=/usr/local/bin/node_exporter \
    --collector.systemd \
    --collector.textfile.directory=/var/lib/node_exporter \
    --web.telemetry-path="/metrics" \
    --web.listen-address="10.200.57.14:9100"

SyslogIdentifier=node_exporter
Restart=always

[Install]
WantedBy=multi-user.target

@paulfantom
Copy link
Member

Hmmm, strange, I used yours and it rendered it differently. I probably made some typo 😄

paulfantom added a commit that referenced this pull request Jul 15, 2018
…us standards; minor changes (#48)

[minor] modification to introduce some of good ideas seen in #47 and ansible-prometheus
- add ansible_managed info to service file
- use `import_tasks` instead of `include`
- specify `become: true` on role level not on playbook level
- split `main.yml` into smaller files: `install.yml` and `configure.yml`
- use one task for installing dependecies
- use vars files for distro-specific values
- use `node_exporter_system_group` and `node_exporter_system_user` which shouldn't be user-defined (defined in `vars` not in `defaults`), but simplify role management
- add tags
- add 2 more preflight checks
@lock
Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants