This change updates the ansible tasks to supply a privilege level (configured as
hwmgmt.priv_level) when calling ipmitool. Without this change, ipmitool defaults
to using the 'ADMINISTRATOR' privilege. This will fail on systems where
hwmgmt.user is assigned a lower privilege level.
This change depends on changes 1076, 1077, and 1078.
signed-off-by: dave kormann <davek@research.att.com>
Change-Id: If97a52fa2f2dbf903f2c8e2311e163b2ffd1b944
[gerrit]
-host=gerrit.att-akraino.org
+host=gerrit.akraino.org
port=29418
-project=rec/infra-ansible
+project=ta/infra-ansible
defaultremote=origin
# limitations under the License.
- name: Deactivate ipmi sol
- command: "/usr/bin/ipmitool -I lanplus -H {{hosts[ironic_node_details.name]['hwmgmt']['address']}} -U {{hosts[ironic_node_details.name]['hwmgmt']['user']}} -P {{hosts[ironic_node_details.name]['hwmgmt']['password']}} sol deactivate"
+ command: "/usr/bin/ipmitool -I lanplus -H {{hosts[ironic_node_details.name]['hwmgmt']['address']}} -U {{hosts[ironic_node_details.name]['hwmgmt']['user']}} -P {{hosts[ironic_node_details.name]['hwmgmt']['password']}} -L {{hosts[ironic_node_details.name]['hwmgmt']['priv_level']}} sol deactivate"
ignore_errors: yes
no_log: True
shell: "source /opt/tmux_setup/tmux.inc; tmux_session_start bash /bin/bash"
- name: Start tmux windows for each nodes
- shell: "source /opt/tmux_setup/tmux.inc; tmux_cmd {{ironic_node_details.name}} /usr/bin/ipmitool -I lanplus -H {{hosts[ironic_node_details.name]['hwmgmt']['address']}} -U {{hosts[ironic_node_details.name]['hwmgmt']['user']}} -P {{hosts[ironic_node_details.name]['hwmgmt']['password']}} sol activate"
+ shell: "source /opt/tmux_setup/tmux.inc; tmux_cmd {{ironic_node_details.name}} /usr/bin/ipmitool -I lanplus -H {{hosts[ironic_node_details.name]['hwmgmt']['address']}} -U {{hosts[ironic_node_details.name]['hwmgmt']['user']}} -P {{hosts[ironic_node_details.name]['hwmgmt']['password']}} -L {{hosts[ironic_node_details.name]['hwmgmt']['priv_level']}} sol activate"
no_log: True
ignore_errors: yes
- name: Deactivate ipmi sol
- command: "/usr/bin/ipmitool -I lanplus -H {{hosts[ironic_node_details.name]['hwmgmt']['address']}} -U {{hosts[ironic_node_details.name]['hwmgmt']['user']}} -P {{hosts[ironic_node_details.name]['hwmgmt']['password']}} sol deactivate"
+ command: "/usr/bin/ipmitool -I lanplus -H {{hosts[ironic_node_details.name]['hwmgmt']['address']}} -U {{hosts[ironic_node_details.name]['hwmgmt']['user']}} -P {{hosts[ironic_node_details.name]['hwmgmt']['password']}} -L {{hosts[ironic_node_details.name]['hwmgmt']['priv_level']}} sol deactivate"
ignore_errors: yes
no_log: True
# limitations under the License.
- name: Ensure all the nodes in the deployment are powered-off.
- command: "/usr/bin/ipmitool -I lanplus -H {{item.value['hwmgmt']['address']}} -U {{item.value['hwmgmt']['user']}} -P {{item.value['hwmgmt']['password']}} chassis power off"
+ command: "/usr/bin/ipmitool -I lanplus -H {{item.value['hwmgmt']['address']}} -U {{item.value['hwmgmt']['user']}} -P {{item.value['hwmgmt']['password']}} -L {{item.value['hwmgmt']['priv_level']}} chassis power off"
with_dict: "{{nodes_to_power_off}}"
no_log: True
when: