Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ansible@control setup]$ history
- 1 sudo dnf install -y epel-release
- 2 cat /etc/redhat-release
- 3 sudo dnf install ansible
- 4 ansible --version
- 5 history
- 6 sudo dnf install vim git -y
- 7 git clone https://github.com/sandervanvugt/rhce8-live
- 8 cd rhce8-live/
- 9 ls
- 10 cd
- 11 ip a
- 12 sudo vim /etc/hosts
- 13 ping ansible1
- 14 ping ansible2
- 15 ssh root@ansible1
- 16 ssh root@ansible2
- 17 history
- 18 cd rhce8-live/
- 19 ls
- 20 ./countdown 12
- 21 ansible-doc -l
- 22 ansible-doc -l | grep user
- 23 mkdir setup
- 24 cd setup/
- 25 vim inventory
- 26 ansible-doc user
- 27 ansible all -m user -a "name=ansible"
- 28 ansible all -m user -a "name=ansible" -i inventory
- 29 ansible all -m user -a "name=ansible" -i inventory -k
- 30 ansible all -m user -a "name=bob" -i inventory -k
- 31 ansible all -m user -a "name=bob" -i inventory -k -u root
- 32 ansible all -m user -a "name=ansible state=absent" -i inventory -k -u root
- 33 history
- 34 cat inventory
- 35 ansible all -m command -a "tail -3 /etc/passwd"
- 36 ansible all -m command -a "tail -3 /etc/passwd" -i inventory
- 37 ansible all -m command -a "tail -3 /etc/passwd" -i inventory -u root -k
- 38 ansible all -m user -a "name=ansible state=present" -i inventory -k -u root
- 39 ssh ansible@ansible2
- 40 history
- 41 sudo -i
- 42 ansible -i inventory all -m command -a "rpm -qa | grep util" -u root -k
- 43 ansible -i inventory all -m shell -a "rpm -qa | grep util" -u root -k
- 44 ansible -i inventory all -m shell -a "echo password | passwd --stdin ansible" -u root -k
- 45 ssh ansible@ansible1
- 46 ansible -i inventory all -m command -a "chown -R ansible:ansible /home/ansible" -u root -k
- 47 ansible -i inventory all -m command -a "ls -al /home/ansible" -u root -k
- 48 ssh ansible1
- 49 ssh ansible2
- 50 sudo vim /etc/hosts
- 51 history
- 52 ansible-doc copy
- 53 history
- 54 ansible -i inventory all -m copy -a 'content="ansible ALL=(ALL) NOPASSWD: ALL" -dest=/etc/sudoers.d/ansible' -u root -k
- 55 cat ~/.ssh/known_hosts
- 56 rm -f ~/.ssh/known_hosts
- 57 ansible -i inventory all -m copy -a 'content="ansible ALL=(ALL) NOPASSWD: ALL" -dest=/etc/sudoers.d/ansible' -u root -k
- 58 ssh ansible1
- 59 ssh ansible2
- 60 cat ~/.ssh/known_hosts
- 61 ansible -i inventory all -m copy -a 'content="ansible ALL=(ALL) NOPASSWD: ALL" -dest=/etc/sudoers.d/ansible' -u root -k
- 62 ansible -i inventory all -m copy -a 'content="ansible ALL=(ALL) NOPASSWD: ALL" dest=/etc/sudoers.d/ansible' -u root -k
- 63 ansible -i inventory all -m user -a "name=bob" -u ansible -k
- 64 ansible -i inventory all -m user -a "name=alice" -u ansible -k
- 65 ansible -i inventory all -m user -a "name=alice" -u ansible -k -b
- 66 ssh-keygen
- 67 ssh-copy-id ansible1
- 68 ssh-copy-id ansible2
- 69 ansible -i inventory all -m user -a "name=bob state=absent" -u ansible -b
- 70 history
Advertisement
Add Comment
Please, Sign In to add comment