Skip to content

Commit

Permalink
bugfix: make uid/gid/password in oracle_users/oracle_groups optional
Browse files Browse the repository at this point in the history
make password optional as well
  • Loading branch information
bartowl authored and Rendanic committed Jul 11, 2022
1 parent 473c046 commit 953bbb9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/107-optional_uid_gid_passwd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- uid/gid/passwd attribute in oracle_users/grid_users/oracle_groups is now optional (#107)
13 changes: 8 additions & 5 deletions roles/orahost/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@
# when: configure_etc_hosts and ansible_default_ipv4.address is defined

- name: User | Add group(s)
ansible.builtin.group: name={{ item.group }} gid={{ item.gid }} state=present
ansible.builtin.group:
name: "{{ item.group }}"
gid: "{{ item.gid | default(omit) }}"
state: present
with_items: "{{ oracle_groups }}"
tags:
- group
Expand All @@ -117,12 +120,12 @@
name: "{{ item.username }}"
group: "{{ item.primgroup }}"
groups: "{{ item.othergroups }}"
uid: "{{ item.uid }}"
uid: "{{ item.uid | default(omit) }}"
home: "{{ item.home | default(omit) }}"
generate_ssh_key: true
append: true
state: present
password: "{{ item.passwd }}"
password: "{{ item.passwd | default(omit) }}"
with_items: "{{ oracle_users }}"
tags:
- user
Expand All @@ -132,12 +135,12 @@
name: "{{ item.username }}"
group: "{{ item.primgroup }}"
groups: "{{ item.othergroups }}"
uid: "{{ item.uid }}"
uid: "{{ item.uid | default(omit) }}"
home: "{{ item.home | default(omit) }}"
generate_ssh_key: true
append: true
state: present
password: "{{ item.passwd }}"
password: "{{ item.passwd | default(omit) }}"
when: role_separation
with_items: "{{ grid_users }}"
tags:
Expand Down

0 comments on commit 953bbb9

Please sign in to comment.