ansible

ansible-playbook test.yml -u root --check --diff --limit my-server.lan

$ cat test.yml 
- hosts: local
  tasks:
  - name: Ansible copy file to remote server
    copy:
      src: /home/agorbachev/git/agorbachev001/alex.txt
      dest: /tmp/alex.txt

# EXEC COMMAND
ansible all -s -u root -m shell -a 'ls -la'

# APPLY PLAYBOOK WITHOUT INVENTORY
ansible-playbook -u root  --diff -i my-host.test.lan, add_user.yml

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>