roghuchi / iLOrest

Automate initial HP iLO settings
MIT License
2 stars 1 forks source link

How to run this plays against BMC #1

Open NileshChandekar opened 2 months ago

NileshChandekar commented 2 months ago

As and when if wanted to run this playbooks, we need the target machine to be passwordless SSH, right now, only BMC access is there, no package can be installed,

SO how we can run this with inventory.

Somethins like this:-

[bmc]
bmc1 ansible_host=192.168.1.100

[bmc:vars]
ilo_user=your_ilo_username
ilo_password=your_ilo_password
NileshChandekar commented 2 months ago

Example:

[bmc]
ilo ansible_host=172.29.xxx.31 ansible_user=ctadmin ansible_password=ctadmin@123
---
- name: Set Server Name using iLOrest
  hosts: bmc
  gather_facts: no
  tasks:
    - name: Set Server Name
      raw: "ilorest set ServerName={{ server_name }}"
      delegate_to: localhost
ansible-playbook -i inventory.ini set_server_name.yml --extra-vars "server_name=NEW_SERVER_NAME"