Thank you all very much for your feedback! All the replies helped me solve 
the task.
cheers!

On Monday, October 22, 2018 at 6:11:26 AM UTC-5, Brad Van Orden wrote:
>
> Not an ansible response (use command or shell to execute), but can 
> retrieve the iLO network settings and change with:
>
> # This is coded against iLO4!
> # Run as root
> cd /var/tmp # or where ever you would like to have your temporary files
> #
> # Get the current configuration
> #
> hponcfg --writeconfig ilo
> #
> # Delete the directory information and user information portions of the 
> xml file.
> #
> sed -i '/^  <DIR_INFO/,/^  <\/DIR_INFO/d' ilo
> sed -i '/^  <USER_INFO/,/^  <\/USER_INFO/d' ilo
> #
> # Compute your new ip address.  Note, OCT4 is based on RHEL 7 type OS 
> using eth0 as the NIC.
> # Adjust as needed.
> #
> BASE_IP=11.11.11.
> OCT4=$(ifconfig eth0 | grep inet | awk '{ print $2 }' | cut -d. -f4)
> #
> # You will probably also want to change the netmask and default gateway.
> # The netmask can be found at: SUBNET_MASK
> # and the gateway at: GATEWAY_IP_ADDRESS
> # Change accordingly.
> #
> sed -i "s|^\(    <IP_ADDRESS VALUE = \"\).*|\1${BASE_IP}${OCT4}\"/>|" ilo
> #
> # Write the new ip to the iLO
> #
> hponcfg --file ilo
>
>
>
> On Saturday, October 20, 2018 at 11:38:38 AM UTC-4, LJ Medina wrote:
>>
>> Hello,
>> I'm trying to assign ILO IP addresses to a range of systems, using a 
>> different subnet than their host IP, just matching the fourth octet.  For 
>> example, if their IP would be 10.10.10.10, I want their ILO IP to be 
>> 11.11.11.10.( Plan is to use "hponcfg" module to configure the host's ILO 
>> after I obtain this address)
>> What is the best way to achieve this with ansible?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/fe5eb71b-b6ad-4f7a-8aa3-ab4abe2bbf54%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to