Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove else parts on linux.system.env #196

Open
madboxkr opened this issue Sep 16, 2019 · 0 comments
Open

Remove else parts on linux.system.env #196

madboxkr opened this issue Sep 16, 2019 · 0 comments

Comments

@madboxkr
Copy link

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant