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

Do not add password arg to user state if does not exist in pillar data #42

Closed
Ch3LL opened this issue Dec 22, 2022 · 1 comment
Closed
Assignees

Comments

@Ch3LL
Copy link
Contributor

Ch3LL commented Dec 22, 2022

The user describe runner will generate a sls file like so:

user-ch3ll:
  user.present:
  - name: ch3ll
  - uid: 1000
  - gid: 1000
  - allow_uid_change: true
  - allow_gid_change: true
  - home: /home/ch3ll
  - shell: /usr/bin/zsh
  - groups:
    - ch3ll
    - lp
    - network
    - power
    - sys
    - wheel
  - password: '{{ salt["pillar.get"]("users:ch3ll","*") }}'
  - date: 18590
  - mindays: 0
  - maxdays: 99999
  - inactdays: -1
  - expire: -1
  - createhome: true
  - fullname: Megan Wilhite

If users:ch3ll is not set in pillar, it will still try changing the password, which would be unexpected for a user who does not know that is a requirement for the user state. We should make this optional and only set the password argument if users:ch3ll is in pillar data. Most likely we will want to handle this with jinja.

@Ch3LL
Copy link
Contributor Author

Ch3LL commented Feb 8, 2023

Closed by #56

@Ch3LL Ch3LL closed this as completed Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants