Skip to content

Commit

Permalink
fix(CI): create user with duplciate code even
Browse files Browse the repository at this point in the history
  • Loading branch information
meysam81 committed Sep 21, 2024
1 parent b1c241b commit 9c93e05
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 100 deletions.
4 changes: 1 addition & 3 deletions roles/promtail/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,4 @@ galaxy_info:
- promtail
- observability

dependencies:
- name: meysam81.general.system_user
version: "<=2.0.0"
dependencies: []
2 changes: 2 additions & 0 deletions roles/promtail/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
- name: Create promtail system user
ansible.builtin.import_tasks: user.yml
- name: Setup Debian
ansible.builtin.include_tasks: setup-Debian.yml
when: ansible_os_family == 'Debian'
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
- name: Create group {{ system_user_group }}
- name: Create group {{ promtail_group }}
ansible.builtin.group:
name: "{{ system_user_group }}"
name: "{{ promtail_group }}"
state: present
system: true
register: created_group
- name: Create user {{ system_user_user }}
- name: Create user {{ promtail_user }}
ansible.builtin.user:
name: "{{ system_user_user }}"
name: "{{ promtail_user }}"
state: present
system: true
shell: /bin/false
create_home: true
group: "{{ created_group.name }}"
groups: "{{ system_user_groups | default(omit) }}"
groups:
- adm
5 changes: 0 additions & 5 deletions roles/promtail/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
---
system_user_user: "{{ promtail_user }}"
system_user_group: "{{ promtail_group }}"
system_user_extra_groups:
- adm

promtail_remote_write_url:
38 changes: 0 additions & 38 deletions roles/system_user/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions roles/system_user/defaults/main.yml

This file was deleted.

2 changes: 0 additions & 2 deletions roles/system_user/handlers/main.yml

This file was deleted.

34 changes: 0 additions & 34 deletions roles/system_user/meta/main.yml

This file was deleted.

2 changes: 0 additions & 2 deletions roles/system_user/tests/inventory

This file was deleted.

5 changes: 0 additions & 5 deletions roles/system_user/tests/test.yml

This file was deleted.

3 changes: 0 additions & 3 deletions roles/system_user/vars/main.yml

This file was deleted.

1 change: 1 addition & 0 deletions roles/vmagent/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ galaxy_info:
- victoriametrics
- observability
- vmagent
- metrics

dependencies: []

0 comments on commit 9c93e05

Please sign in to comment.