saltstack/salt

[BUG] gpg.encrypt text=foo output=/some/file does not write to a file

Open

#56,645 opened on Apr 15, 2020

View on GitHub
 (4 comments) (0 reactions) (0 assignees)Python (13,710 stars) (5,508 forks)batch import
ConfirmedExecution-Modulebuggood first issueneeds-testcaseseverity-medium

Description

Description

A clear and concise description of what the bug is.

Setup

Create/import a GPG key.

Steps to Reproduce the behavior

Try to encrypt some text:

[root@master1 salt]# salt-call gpg.encrypt text=foo recipients=2CFCA2B538DD0FAC75838096A4E89A0D3328D483 output=/tmp/encrypted_foo.txt user=salt
local:
    ----------
    comment:
        Encrypted data has been written to /tmp/encrypted_foo.txt
    res:
        True
[root@master1 salt]# cat /tmp/encrypted_foo.txt
cat: /tmp/encypted_foo.txt: No such file or directory

Expected behavior

The file should be created.

Versions Report

# salt-call test.versions_report
local:
    Salt Version:
               Salt: 3000.1
     
    Dependency Versions:
               cffi: Not Installed
           cherrypy: Not Installed
           dateutil: Not Installed
          docker-py: Not Installed
              gitdb: Not Installed
          gitpython: Not Installed
             Jinja2: 2.7.2
            libgit2: Not Installed
           M2Crypto: Not Installed
               Mako: Not Installed
       msgpack-pure: Not Installed
     msgpack-python: 0.6.2
       mysql-python: Not Installed
          pycparser: Not Installed
           pycrypto: 2.6.1
       pycryptodome: Not Installed
             pygit2: Not Installed
             Python: 2.7.5 (default, Aug  7 2019, 00:51:29)
       python-gnupg: 0.4.3
             PyYAML: 3.11
              PyZMQ: 15.3.0
              smmap: Not Installed
            timelib: Not Installed
            Tornado: 4.5.3
                ZMQ: 4.1.4
     
    System Versions:
               dist: centos 7.6.1810 Core
             locale: UTF-8
            machine: x86_64
            release: 5.3.0-46-generic
             system: Linux
            version: CentOS Linux 7.6.1810 Core

Contributor guide