Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Running the Playbook
- ```
- ansible-playbook uname.yml 15:50:17 [0]
- PLAY [all] *********************************************************************
- TASK [setup] *******************************************************************
- ok: [127.0.0.1]
- ok: [archwomen.org]
- ok: [104.233.122.181]
- ok: [64.137.243.176]
- ok: [64.137.180.62]
- ok: [104.233.125.240]
- TASK [get the kernel version] **************************************************
- changed: [127.0.0.1]
- changed: [archwomen.org]
- changed: [64.137.180.62]
- changed: [104.233.122.181]
- changed: [64.137.243.176]
- changed: [104.233.125.240]
- TASK [debug] *******************************************************************
- ok: [127.0.0.1] => {
- "out.stdout_lines": [
- "4.4.13-1-lts"
- ]
- }
- ok: [archwomen.org] => {
- "out.stdout_lines": [
- "4.5.5.201605211442-1-grsec"
- ]
- }
- ok: [104.233.122.181] => {
- "out.stdout_lines": [
- "10.3-RELEASE"
- ]
- }
- ok: [64.137.243.176] => {
- "out.stdout_lines": [
- "10.3-RELEASE-p4"
- ]
- }
- ok: [64.137.180.62] => {
- "out.stdout_lines": [
- "10.3-RELEASE-p4"
- ]
- }
- ok: [104.233.125.240] => {
- "out.stdout_lines": [
- "10.3-RELEASE"
- ]
- }
- PLAY RECAP *********************************************************************
- 104.233.122.181 : ok=3 changed=1 unreachable=0 failed=0
- 104.233.125.240 : ok=3 changed=1 unreachable=0 failed=0
- 127.0.0.1 : ok=3 changed=1 unreachable=0 failed=0
- 64.137.180.62 : ok=3 changed=1 unreachable=0 failed=0
- 64.137.243.176 : ok=3 changed=1 unreachable=0 failed=0
- archwomen.org : ok=3 changed=1 unreachable=0 failed=0
- ```
- ## /etc/ansible/hosts
- ```
- [freebsd]
- 104.233.122.181 ansible_connection=paramiko
- 104.233.125.240 ansible_connection=paramiko
- 64.137.180.62 ansible_connection=paramiko
- 64.137.243.176 ansible_connection=paramiko
- [freebsd:vars]
- ansible_python_interpreter=/usr/local/bin/python2.7
- ansible_bash_interpreter=/usr/local/bin/bash
- ansible_perl_interpreter=/usr/local/bin/perl
- ansible_ruby_interpreter=/usr/local/bin/ruby
- ansible_go_interpreter=/usr/local/bin/go
- [local]
- 127.0.0.1
- [archwomen]
- archwomen.org
- [archlinux:children]
- local
- archwomen
- [archlinux:vars]
- ansible_python_interpreter=/usr/bin/python2.7
- ```
- ## /etc/ansible/ansible.cgf
- ```
- [defaults]
- nocows = 1
- [privilege_escalation]
- [paramiko_connection]
- [ssh_connection]
- [accelerate]
- [selinux]
- [colors]
- ```
- ## /etc/ansible/playbooks/uname.yml
- ```
- ---
- - hosts: all
- tasks:
- - name: get the kernel version
- shell: uname -r
- register: out
- - debug: var=out.stdout_lines
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement