如何阻止ansible将密码写入日志文件?
我正在设置一个MySQL服务器,并希望Ansible mysql-root在安装过程中设置密码。 借助互联网,我提出了以下解决方案: - name: Set MySQL root password before installing debconf: name='mysql-server' question='mysql-server/root_password' value='{{mysql_root_pwd | quote}}' vtype='password' - name: Confirm MySQL root password before installing debconf: name='mysql-server' question='mysql-server/root_password_again' value='{{mysql_root_pwd | quote}}' vtype='password' - name: Install Mysql apt: pkg=mysql-server state=latest mysql_root_pwd是从Ansible Vault加载的变量。运行正常,但是现在服务器上的日志中有很多行: Apr 10 14:39:59 servername ansible-debconf: Invoked with value=THEPASSWORD …