Skip to content

Commit

Permalink
🐛 bug fix: correct path for .hushlogin of non-root user (#6549)
Browse files Browse the repository at this point in the history
This PR is a minor bug fix for the path directory when creating
.hushlogin file in the `cluster-prepare.yaml` playbook.

I would have included another change for the `cluster-installation.yaml`
playbook as ansible currently throws the following error: ```ERROR!
Using 'ansible.builtin.include_role' as a handler is not supported. ```
Sadly, I cannot find a solution as I have tried alternate modules, but
it seems that a handler can't be used for some reason. Perhaps it's a
quick fix for you as I have just opted to put a reboot task for now?

Main changes:

* `ansible/main/playbooks/cluster-prepare.yaml`: Modified the
`cluster-prepare.yaml` playbook.
(ansible/main/playbooks/cluster-prepare.yaml)
  • Loading branch information
osnabrugge authored Dec 12, 2023
1 parent af6149e commit 6e4f1b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ansible/main/playbooks/cluster-prepare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
key: "https://github.com/{{ github_username }}.keys"
- name: User Configuration | Silence login
ansible.builtin.file:
dest: "{{ ansible_user if ansible_user != 'root' else '/root' }}/.hushlogin"
dest: "{{ '/home/' + ansible_user if ansible_user != 'root' else '/root' }}/.hushlogin"
state: touch
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
Expand Down

0 comments on commit 6e4f1b3

Please sign in to comment.