Skip to content

file.line state changes doesn't show newlines in diff #39218

@anlutro

Description

@anlutro

When using a file.line state with mode: insert, it works fine, but the state output diff is malformed - it seems to have stripped away newlines.

          ID: /etc/pam.d/sshd
    Function: file.line
      Result: True
     Comment: Changes were made
     Started: 11:49:41.403329
    Duration: 2.269 ms
     Changes:   
              ----------
              diff:
                  --- 
                  +++ 
                  @@ -45,7 +45,7 @@
                   # In Debian 4.0 (etch), locale-related environment variables were moved to # /etc/default/locale, so read that as well. session    required     pam_env.so user_readenv=1 envfile=/etc/default/locale-session optional pam_exec.so stdout /usr/local/sbin/REDACTED+session optional pam_exec.so stdout /usr/local/sbin/REDACTED  # SELinux needs to intervene at login time to ensure that the process starts # in the proper default security context.  Only sessions which are intended
$ salt-call --versions-report
Salt Version:
           Salt: 2016.11.2
 
Dependency Versions:
           cffi: 0.8.6
       cherrypy: 3.2.3
       dateutil: 2.2
          gitdb: 0.5.4
      gitpython: 0.3.2 RC1
          ioflo: Not Installed
         Jinja2: 2.7.3
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.2
   mysql-python: 1.2.3
      pycparser: 2.10
       pycrypto: 2.6.1
         pygit2: Not Installed
         Python: 2.7.9 (default, Jun 29 2016, 13:08:31)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 14.4.0
           RAET: Not Installed
          smmap: 0.8.2
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.5
 
System Versions:
           dist: debian 8.6 
        machine: x86_64
        release: 3.16.0-4-amd64
         system: Linux
        version: debian 8.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4Priority 4PlatformRelates to OS, containers, platform-based utilities like FS, system based appsbugbroken, incorrect, or confusing behaviorseverity-low4th level, cosemtic problems, work around existsstale

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions