-
Notifications
You must be signed in to change notification settings - Fork 25
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
Host provision - bootstrapping actions done as customeradmin
#88
Conversation
… for connection validation
The inventory file creation has been avoided. More structure introduced that will lend well into the next stage of introducing the core logic of host provisioning, like LVM, RHEL subscription, etc. https://gist.github.com/jcnars/6858344c22cef0d94b851a17de68f1c8 contains the successful run of the following: ✔ ~/050521-mntrl-instlln/bms-toolkit [host-provision L|✚ 2…19]
21:47 $ ./host-provision.sh --comma-separated-dbhosts 172.16.30.1 --instance-ssh-user ansible10
Command used:
./host-provision.sh --comma-separated-dbhosts 172.16.30.1 --instance-ssh-user ansible10
Running with parameters from command line or environment variables:
INSTANCE_SSH_USER=ansible10
INVENTORY_FILE=172.16.30.1,
ORA_CS_HOSTS=172.16.30.1
Found Ansible at /usr/bin/ansible-playbook
Running Ansible playbook: /usr/bin/ansible-playbook -i 172.16.30.1, host-provision.yml
PLAY [Create private public key pair locally] **********************************************************************************************************************************
TASK [Gathering Facts] ************ |
@@ -131,3 +131,8 @@ install_rdbms: true | |||
disable_firewall: false | |||
|
|||
## End of non-modifiable variables section | |||
|
|||
## host provision variables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I put in a coment about this, but now can't find it. Apologies if it's duplicated.
In terms of group vars, I'd prefer if we don't have hostprovision in the name, and instead have the ability to reuse them across multiple parts of the code, now or in the future.
A suggestion for naming:
instance_ssh_user
firsttime_connect_user
control_node_key_file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, will do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the suggestions here have been incorporated and tested successfully.
https://gist.github.com/jcnars/d0e4887c736ddbd3dcc5c9a26d4d24db
Pls check if it looks good.
Thanks
host-provision.yml
Outdated
@@ -38,10 +38,10 @@ | |||
hosts: all | |||
vars_prompt: | |||
- name: ansible_password | |||
prompt: Enter customeradmin password | |||
prompt: Enter firsttime_connect_user password |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to dereference the variable so that a user will see "Enter customeradmin password"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There may be, but first glance, extrapolating this variable is introducing complexity that we can do away.
Ansible user creation and configuring ssh equivalence for the created user between the control node and DB hosts.
Successful validation: https://gist.github.com/jcnars/ff9d76574c9db4028a683faf0db6f8b1
Once this PR is reviewed and merged, will be using the same branch to submit other host provisioning actions
(typically, those may no longer need the
customeradmin
)