Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

theodrosyimer/ansible

Repository files navigation

Ansible commands

Basics

execute on all hosts:

ansible-playbook -i inventory/file/path playbook/file/path

Gathering facts

for all hosts:

ansible -i inventory/file/path all -m setup

for a single host:

ansible 192.168.1.20 -i inventory/file/path -m setup

redirect the output to a file:

ansible -i inventory/file/path all -m setup > system_facts.txt

these facts are stored in the ansible_facts variable and they are used, for example, in the when condition:

- name: install apache
 yum:
 name: httpd
 state: latest
 when: ansible_facts['os_family'] == 'RedHat'

README STILL IN PROGRESS...

About

Learning journey to master Ansible.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /