adhoc: use copy module with content
This commit is contained in:
@@ -2,5 +2,7 @@ ansible all -u root -k -m user -a "user=ansible password={{ 'ansible'|password_h
|
||||
|
||||
ansible all -u root -k -m lineinfile -a "path=/etc/sudoers.d/ansible state=present create=yes line='ansible ALL=(ALL) NOPASSWD: ALL' validate='/usr/sbin/visudo -cf %s'"
|
||||
|
||||
ansible all -u root -k -m copy -a "dest=/etc/sudoers.d/ansible content='ansible ALL=(ALL) NOPASSWD: ALL' validate='/usr/sbin/visudo -cf %s"
|
||||
|
||||
ansible all -u root -k -m authorized_key -a "key={{ lookup( 'file', '/root/.ssh/id_rsa.pub') }} user=ansible"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user