You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While making a change to ansible/bruno.yaml, I realized that the steps to figure out which profile to update could end up with the wrong file if there is more than one potential file.
From the man page:
... (bash) looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.
The playbook does indeed look for the files in that order but if the target system has both .bash_profile and .bash_login, the playbook will decide to use .bash_login because will only remember the last file it looked for. The playbook probably needs to be changed to:
Maintain the order of step execution but skip steps once a file is found (probably requires a default value of an empty string) - this is probably more like how bash really works
Reverse to order of step execution so .bash_profile can override the other two files, etc.
Test scenario
Spin up a virtual machine for the target
Create .bash_profile and .bash_login on the target
Use ansible-bruno command the target
Analyze the playbook output and/or examine the profiles and determine which got updated
The text was updated successfully, but these errors were encountered:
While making a change to
ansible/bruno.yaml
, I realized that the steps to figure out which profile to update could end up with the wrong file if there is more than one potential file.From the man page:
The playbook does indeed look for the files in that order but if the target system has both
.bash_profile
and.bash_login
, the playbook will decide to use.bash_login
because will only remember the last file it looked for. The playbook probably needs to be changed to:.bash_profile
can override the other two files, etc.Test scenario
.bash_profile
and.bash_login
on the targetansible-bruno
command the targetThe text was updated successfully, but these errors were encountered: