#!/bin/bash
echo test:sdhrBNa123\!\@\# |chpasswd
ansible xxx -m script -a '/root/shell/testpawd.sh'
如果密码中包含 $ 字符,需要使用反斜线进行转义
#!/bin/bash
echo test:sdhrBNa123\!\@\# |chpasswd
ansible xxx -m script -a '/root/shell/testpawd.sh'
如果密码中包含 $ 字符,需要使用反斜线进行转义