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

Make edpm_users role compliant with ansible-lint production profile #442

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}"