Skip to content

Commit

Permalink
Export default ENV when PATH is required for command execution
Browse files Browse the repository at this point in the history
exportfs and authconfig execution was failing with:
No such file or directory - exportfs/authconfig

### References
* `default_env true` documentation: https://docs.chef.io/resources/execute/#properties
* Related issue: sous-chefs/nfs#106

Signed-off-by: Enrico Usai <[email protected]>
  • Loading branch information
enrico-usai committed Jun 26, 2023
1 parent 68f1702 commit 793437f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
user 'root'
# Tell NSS, PAM to use SSSD for system authentication and identity information
command "authconfig --enablemkhomedir --enablesssdauth --enablesssd --updateall"
default_env true
sensitive true
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
user 'root'
# Enable PAM mkhomedir module
command "pam-auth-update --enable mkhomedir"
default_env true
sensitive true
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
# authconfig is a compatibility tool, replaced by authselect
command "authselect select sssd with-mkhomedir"
sensitive true
default_env true
end unless redhat_on_docker?
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,6 @@

execute "unexport volume" do
command "exportfs -ra"
default_env true
end
end

0 comments on commit 793437f

Please sign in to comment.