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

Case insensitive control node lookup #126

Merged
merged 1 commit into from
May 30, 2021
Merged

Conversation

mrobinsn
Copy link
Contributor

Fix: case insensitive control node lookup

Summary

Apologies for the lack of info, using this role is my first foray into the world of Ansible.

This PR fixes an issue I was running into where my /tmp/inventory.txt file didn't contain C_True, but it did contain C_true. Didn't seem to me like the casing matters so I threw a -i on the grep command and everything started working.

 $ ssh <a node> -- sudo cat /tmp/inventory.txt  
# BEGIN ANSIBLE MANAGED BLOCK
<node1> @@@ <node1>  @@@ C_False @@@ P_False @@@ END:<node1> 
<node2> @@@ <node2> @@@ C_False @@@ P_False @@@ END:<node2>
<node3> @@@ <node3> @@@ C_False @@@ P_False @@@ END:<node3>
<node4 (primary)> @@@ <node4 (primary)> @@@ C_true @@@ P_False @@@ END:<node4 (primary)>
# END ANSIBLE MANAGED BLOCK

I am setting k3s_control_node=true on my primary node in the inventory.

Issue type

  • Bugfix

@xanmanning xanmanning self-assigned this May 29, 2021
@xanmanning xanmanning added the bug Something isn't working label May 29, 2021
@xanmanning
Copy link
Member

Not sure why it was writing it differently, however I can see this makes it a bit more robust. Thanks 👍

@xanmanning xanmanning merged commit 10d11c6 into PyratLabs:main May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants