Advertisement
sandervanvugt

Setting up Ansible base config

Oct 5th, 2020
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. RUN AS ROOT 1 free -m
  2. 2 lsblk
  3. 3 cat /etc/redhat-release
  4. 4 vim /etc/hosts
  5. 5 yum install -y vim bash-completion git
  6. 6 vim /etc/hosts
  7. 7 ping ansible1
  8. 8 ping ansible2
  9. 9 yum install -y epel-release
  10. 10 yum install -y ansible
  11. 11 history
  12. 12 echo "ansible ALL=(ALL) NOPASSWD: ALL"> /etc/sudoers.d/ansible
  13. 13 ssh ansible1 'echo "ansible ALL=(ALL) NOPASSWD: ALL"> /etc/sudoers.d/ansible'
  14. 14 ssh ansible2 'echo "ansible ALL=(ALL) NOPASSWD: ALL"> /etc/sudoers.d/ansible'
  15.  
  16. RUN AS ANSIBLE ON CONTROL 1 ssh-keygen
  17. 2 ssh-copy-id ansible1
  18. 3 ssh-copy-id ansible2
  19. 4 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement