ansible-playbook my-playbook.yml -i inventory_file --extra-vars "target=hostname" --check
vi my-playbook.yml
---
- hosts: '{{ target }}'
remote_user: root
tasks:
- name: Install http on remote server
yum: pkg=httpd state=latest
ansible-playbook my-playbook.yml -i inventory_file --extra-vars "target=hostname" --check
vi my-playbook.yml
---
- hosts: '{{ target }}'
remote_user: root
tasks:
- name: Install http on remote server
yum: pkg=httpd state=latest
Thanks very interesting blog!