1. Login to Ansible management server/machine. Create SSH keys in Ansible host machine by executing the below command: (if you already have keys created, please skip this step)
ssh-keygen
enter three times..now you will see keys successfully created.
2. Execute the below command on Ansible management node and copy the public key content:
sudo cat ~/.ssh/id_rsa.pub
copy the above output.
3. Now login to target node, execute the below command to open the file
sudo vi /home/ubuntu/.ssh/authorized_k eys
type shift A and then enter now
and paste the key in the above file. please do not delete any existing values in this file.
4. Now go back to Ansible mgmt node, do changes in /etc/ansible/hosts file to include the node you will be installing software. Make sure you add public IP address of target node as highlighted below in red color:
sudo vi /etc/ansible/hosts
[My_Group]
xx.xx.xx.xx ansible_ssh_user=ubuntu ansible_ssh_private_key_file=~ /.ssh/id_rsa ansible_python_interpreter=/us r/bin/python3
5. make changes in playbooks as given below,
cd ~/playbooks
sudo vi installJava8.yml
---
- hosts: My_Group
tasks:
- name: Update APT package manager repositories cache
become: true
apt:
update_cache: yes
- name: Install Java using Ansible
become: yes
apt:
name: "{{ packages }}"
state: present
vars:
packages:
- openjdk-8-jdk
6. Execute Ansible playbook
sudo ansible-playbook installJava8.yml
ssh-keygen
enter three times..now you will see keys successfully created.
2. Execute the below command on Ansible management node and copy the public key content:
sudo cat ~/.ssh/id_rsa.pub
copy the above output.
3. Now login to target node, execute the below command to open the file
sudo vi /home/ubuntu/.ssh/authorized_k
type shift A and then enter now
and paste the key in the above file. please do not delete any existing values in this file.
4. Now go back to Ansible mgmt node, do changes in /etc/ansible/hosts file to include the node you will be installing software. Make sure you add public IP address of target node as highlighted below in red color:
sudo vi /etc/ansible/hosts
[My_Group]
xx.xx.xx.xx ansible_ssh_user=ubuntu ansible_ssh_private_key_file=~
5. make changes in playbooks as given below,
cd ~/playbooks
sudo vi installJava8.yml
---
- hosts: My_Group
tasks:
- name: Update APT package manager repositories cache
become: true
apt:
update_cache: yes
- name: Install Java using Ansible
become: yes
apt:
name: "{{ packages }}"
state: present
vars:
packages:
- openjdk-8-jdk
6. Execute Ansible playbook
sudo ansible-playbook installJava8.yml
It can also be|can be} used to help make trim passes utilizing the identical coordinates. Small errors are inevitable within the positioning of a tool when it's set up. In addition, single-point turning or boring instruments will begin to wear during use. Both these factors will immediately have an effect Bottle Warmers on} the dimensions of the workpiece being machined. Depending on the applying, other interpolation types additionally be} required on turning facilities that have stay tooling.
ReplyDelete