ref: bd31e7c59f1fa7ff92ac8c3c1c2f874ba1fe832b cisco/deploy/ipmi/ipmi.yml -rw-r--r-- 705 bytes View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
- name: IPMI configuration
  hosts: all
  tasks:
  - name: Install ipmitool
    apt:
      name: ipmitool

  - name: Enable ipmi over lan
    shell: ipmitool lan set 1 access on

  - name: Set root user
    shell: ipmitool user set name 2 root
    when: '"ipmi" in net and "ipv4" in net["ipmi"]'

  - name: Set root password
    shell: ipmitool user set password 2 ''
    when: '"ipmi" in net and "ipv4" in net["ipmi"]'

  - name: Enable admin rights for root
    shell: ipmitool channel setaccess 1 2 link=on ipmi=on callin=on privilege=4
    when: '"ipmi" in net and "ipv4" in net["ipmi"]'

  - name: Enable the user
    shell: ipmitool user enable 2
    when: '"ipmi" in net and "ipv4" in net["ipmi"]'