Skip to content

Commit

Permalink
Merge pull request #442 from rebtoor/users_production_profile
Browse files Browse the repository at this point in the history
Make `edpm_users` role compliant with ansible-lint `production` profile
  • Loading branch information
openshift-ci[bot] authored Oct 16, 2023
2 parents 4fe59b1 + 30b1091 commit e43d6f5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion roles/edpm_users/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ argument_specs:
main:
short_description: The main entry point for the edpm_users role.
description:
- |
- |
This role will create the users and groups listed in this variable and is intended to be used
whenever we required users and or groups to be created on the host that match the users and or groups
of the containers running on the host. it can also create directories and set their ownership and permissions.
Expand Down
6 changes: 3 additions & 3 deletions roles/edpm_users/tasks/create_users_and_groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
# License for the specific language governing permissions and limitations
# under the License.

- name: create host user and group
- name: Create host user and group
become: true
tags:
- edpm_users
block:
- name: Ensure {{ item.name }} group is present on the host
- name: Ensure group is present on the host [ {{ item.name }} ]
ansible.builtin.group:
name: "{{ item.name }}"
gid: "{{ item.gid }}"
state: present
- name: Ensure {{ item.name }} user is present on the host
- name: Ensure user is present on the host [ {{ item.name }} ]
when: not (item.group_only | default(false))
ansible.builtin.user:
name: "{{ item.name }}"
Expand Down
6 changes: 3 additions & 3 deletions roles/edpm_users/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
# License for the specific language governing permissions and limitations
# under the License.

- name: create host users and groups
- name: Create host users and groups
ansible.builtin.include_tasks: create_users_and_groups.yml
loop: "{{ edpm_users_users }}"

- name: create host directories
- name: Create host directories
become: true
ansible.builtin.file:
path: "{{ item.path }}"
state: directory
owner: "{{ item.owner | default(omit) }}"
group: "{{ item.group | default(omit) }}"
setype: "{{ item.setype | default(omit) }}"
seuser: "{{item.seuser | default(omit) }}"
seuser: "{{ item.seuser | default(omit) }}"
mode: "{{ item.mode | default(omit) }}"
loop: "{{ edpm_users_extra_dirs }}"

0 comments on commit e43d6f5

Please sign in to comment.