Advertisement
Guest User

Untitled

a guest
Jun 24th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. ## Running the Playbook
  2.  
  3. ```
  4. ansible-playbook uname.yml 15:50:17 [0]
  5.  
  6. PLAY [all] *********************************************************************
  7.  
  8. TASK [setup] *******************************************************************
  9. ok: [127.0.0.1]
  10. ok: [archwomen.org]
  11. ok: [104.233.122.181]
  12. ok: [64.137.243.176]
  13. ok: [64.137.180.62]
  14. ok: [104.233.125.240]
  15.  
  16. TASK [get the kernel version] **************************************************
  17. changed: [127.0.0.1]
  18. changed: [archwomen.org]
  19. changed: [64.137.180.62]
  20. changed: [104.233.122.181]
  21. changed: [64.137.243.176]
  22. changed: [104.233.125.240]
  23.  
  24. TASK [debug] *******************************************************************
  25. ok: [127.0.0.1] => {
  26. "out.stdout_lines": [
  27. "4.4.13-1-lts"
  28. ]
  29. }
  30. ok: [archwomen.org] => {
  31. "out.stdout_lines": [
  32. "4.5.5.201605211442-1-grsec"
  33. ]
  34. }
  35. ok: [104.233.122.181] => {
  36. "out.stdout_lines": [
  37. "10.3-RELEASE"
  38. ]
  39. }
  40. ok: [64.137.243.176] => {
  41. "out.stdout_lines": [
  42. "10.3-RELEASE-p4"
  43. ]
  44. }
  45. ok: [64.137.180.62] => {
  46. "out.stdout_lines": [
  47. "10.3-RELEASE-p4"
  48. ]
  49. }
  50. ok: [104.233.125.240] => {
  51. "out.stdout_lines": [
  52. "10.3-RELEASE"
  53. ]
  54. }
  55.  
  56. PLAY RECAP *********************************************************************
  57. 104.233.122.181 : ok=3 changed=1 unreachable=0 failed=0
  58. 104.233.125.240 : ok=3 changed=1 unreachable=0 failed=0
  59. 127.0.0.1 : ok=3 changed=1 unreachable=0 failed=0
  60. 64.137.180.62 : ok=3 changed=1 unreachable=0 failed=0
  61. 64.137.243.176 : ok=3 changed=1 unreachable=0 failed=0
  62. archwomen.org : ok=3 changed=1 unreachable=0 failed=0
  63. ```
  64.  
  65. ## /etc/ansible/hosts
  66.  
  67. ```
  68. [freebsd]
  69. 104.233.122.181 ansible_connection=paramiko
  70. 104.233.125.240 ansible_connection=paramiko
  71. 64.137.180.62 ansible_connection=paramiko
  72. 64.137.243.176 ansible_connection=paramiko
  73.  
  74. [freebsd:vars]
  75. ansible_python_interpreter=/usr/local/bin/python2.7
  76. ansible_bash_interpreter=/usr/local/bin/bash
  77. ansible_perl_interpreter=/usr/local/bin/perl
  78. ansible_ruby_interpreter=/usr/local/bin/ruby
  79. ansible_go_interpreter=/usr/local/bin/go
  80.  
  81. [local]
  82. 127.0.0.1
  83.  
  84. [archwomen]
  85. archwomen.org
  86.  
  87. [archlinux:children]
  88. local
  89. archwomen
  90.  
  91. [archlinux:vars]
  92. ansible_python_interpreter=/usr/bin/python2.7
  93. ```
  94.  
  95. ## /etc/ansible/ansible.cgf
  96.  
  97. ```
  98. [defaults]
  99. nocows = 1
  100. [privilege_escalation]
  101. [paramiko_connection]
  102. [ssh_connection]
  103. [accelerate]
  104. [selinux]
  105. [colors]
  106. ```
  107.  
  108. ## /etc/ansible/playbooks/uname.yml
  109.  
  110. ```
  111. ---
  112. - hosts: all
  113. tasks:
  114. - name: get the kernel version
  115. shell: uname -r
  116. register: out
  117. - debug: var=out.stdout_lines
  118. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement