Ansible

Manage Ansible Playbook for multiple environments

directory structure

host_key_checking = False ( You will not see this error "The authenticity of host “hostname” can’t be established." if you specify this variable.
---
- hosts: all
  gather_facts: True  ( This will check the connectivity between   master and other nodes)
  become: true

  vars:
    java_version: "{{ java_version}}"

  roles:
    - role: install-java
ansible-playbook main.yml -i inventories/dev/hosts -k -K -e '@configs/dev.yml' -e 'java_version=1.8'
Please follow and like us: