Skip to content

Remove else parts on linux.system.env #196

@madboxkr

Description

@madboxkr

I hope you well, all.

On. linux.system.env ,
It's not need to managed /etc/environment when linux.env is empty.

IMHO.


diff --git a/linux/system/env.sls b/linux/system/env.sls
index 8b3aade..2eb6bc6 100644
--- a/linux/system/env.sls
+++ b/linux/system/env.sls
@@ -20,17 +20,5 @@ linux_system_environment_proxies:
       http_proxy: {{ system.env.get('http_proxy', None) }}
       ftp_proxy: {{ system.env.get('ftp_proxy', None) }}

-{%- else %}
-
-linux_system_environment_proxies:
-  file.blockreplace:
-  - name: /etc/environment
-  - marker_start: '# SALT MANAGED VARIABLES - DO NOT EDIT - START'
-  - content:      '# '
-  - marker_end:   '# SALT MANAGED VARIABLES - END'
-  - append_if_not_found: True
-  - backup: '.bak'
-  - show_changes: True
-
 {%- endif %}
 {%- endif %}

Or. Need to use same maker_start,end on Else


on IF
  - marker_start: '# START - SALT MANAGED VARIABLES, DO NOT EDIT'
  - marker_end:   '# END - SALT MANAGED VARIABLES'

on ELSE
  - marker_start: '# SALT MANAGED VARIABLES - DO NOT EDIT - START'
  - content:      '# '
  - marker_end:   '# SALT MANAGED VARIABLES - END'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions