#install ipmitool (this is for debian)
apt-get install ipmitool
#insert the kernel modules needed for ipmi
modprobe ipmi_devintf
modprobe ipmi_si
modprobe ipmi_msghandler
#get the current mode (01 00 is dedicated mode)
ipmitool raw 0x30 0x70 0x0c 0
#send the raw command to enable dedicated lan
ipmitool raw 0x30 0x70 0xc 1 1 0
You can use arithmetic calculations in Ansible using the Jinja syntax. This is helpful in many situations where you have stored the output of an operation, and you need to manipulate that value. All usual operation like addition, subtraction, multiplication, division, and modulo are possible. Let us start with an example. We will be using the debug module to print the out the result. The following tasks show all the basic arithmetic operations. The output is given in comments. Ansible arithmetic operation example - hosts: loc tasks: - debug: msg: "addition{{ 4 +3 }}" #Ansible addition 7 - debug: msg: "substraction {{ 4 - 3 }}" #Ansible arithmetic substraction 1 - debug: msg: "multiplication {{ 4 * 3 }}" #multiplication 12 - debug: msg: "Modulo operation {{ 7 % 4}}" #ansible Modulo operation - find remainder 3 - debug: msg: "floating division {{ 4 / 3}}" #ansible floating divisio...
Комментарии
Отправить комментарий