Browse Source

added indexing for sysfs id

related bug: PROD-21512

Change-Id: I874535dbc6882ad49f133999209ae6a4c3bde403
pull/162/head
Ondrej Smola 6 years ago
parent
commit
6040a3f96d
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      linux/system/sysfs.sls

+ 2
- 1
linux/system/sysfs.sls View File

{%- endif %} {%- endif %}


{%- for item in sysfs_list %} {%- for item in sysfs_list %}
{%- set list_idx = loop.index %}
{%- for key, value in item.items() %} {%- for key, value in item.items() %}
{%- if key not in ["mode", "owner"] %} {%- if key not in ["mode", "owner"] %}
{%- if grains.get('virtual_subtype', None) not in ['Docker', 'LXC'] %} {%- if grains.get('virtual_subtype', None) not in ['Docker', 'LXC'] %}
{#- Sysfs cannot be set in docker, LXC, etc. #} {#- Sysfs cannot be set in docker, LXC, etc. #}
linux_sysfs_write_{{ name }}_{{ key }}:
linux_sysfs_write_{{ list_idx }}_{{ name }}_{{ key }}:
module.run: module.run:
- name: sysfs.write - name: sysfs.write
- key: {{ key }} - key: {{ key }}

Loading…
Cancel
Save