Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ansible@control ~]$ history
- 1 ip a
- 2 sudo vi /etc/hosts
- 3 cat /etc/hosts
- 4 sudo dnf install epel -y
- 5 sudo dnf install epel-release -y
- 6 sudo dnf install -y ansible
- 7 vim inventory
- 8 ping rocky
- 9 ping ubuntu
- 10 sudo vi /etc/hosts
- 11 ping ubuntu
- 12 ansible --version
- 13 sudo dnf install git -y
- 14 git clone https://github.com/sandervanvugt/ansibleinthreeweeks
- 15 cd ansibleinthreeweeks/
- 16 ls
- 17 git pull
- 18 ./countdown 12
- 19 sudo sh -c "echo password | passwd --stdin ansible"
- 20 echo ansible ALL=(ALL) NOPASSWD: ALL >/tmp/sudoers
- 21 echo "ansible ALL=(ALL) NOPASSWD: ALL" >/tmp/sudoers
- 22 cd ..
- 23 cat inventory
- 24 ansible rocky -i inventory -u root -k -m raw -a "useradd -G wheel ansible"
- 25 ssh root@rocky
- 26 ansible rocky -i inventory -u root -k -m raw -a "useradd -G wheel ansible"
- 27 ansible rocky -i inventory -u root -k -m command -a "id"
- 28 ansible rocky -i inventory -u root -k -m command -a "id ansible"
- 29 history
- 30 ansible rocky -i inventory -u root -k -m shell -a "echo password | passwd --stdin ansible"
- 31 ssh ansible@rocky
- 32 ansible rocky -i inventory -u root -k -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
- 33 ansible rocky -u ansible -k -i inventory -m command -a "ls -l /root"
- 34 ansible rocky -u ansible -k -i inventory -b -m command -a "ls -l /root"
- 35 ssh-keygen
- 36 ssh-copy-id rocky
- 37 ansible rocky -u ansible -i inventory -b -m command -a "ls -l /root"
- 38 history
- 39 #ansible ubuntu -i inventory -u student -k -b -K -m command -a "useradd -G sudo ansible"
- 40 ssh student@ubuntu
- 41 #ansible ubuntu -i inventory -u student -k -b -K -m command -a "useradd -m -G sudo ansible"
- 42 ansible ubuntu -i inventory -u student -k -b -K -m command -a "useradd -m -G sudo ansible"
- 43 ansible ubuntu -i inventory -u ansible -k -b -K -m command -a "ls /root"
- 44 ansible ubuntu -i inventory -u student -k -b -K -m shell -a "echo ansible:password | chpasswd"
- 45 ansible ubuntu -i inventory -u ansible -k -b -K -m command -a "ls /root"
- 46 ansible ubuntu -i inventory -u ansible -k -b -K -m command -a "ls -a /root"
- 47 ssh-copy-id ubuntu
- 48 ansible ubuntu -i inventory -u ansible -b -K -m command -a "ls -a /root"
- 49 ansible ubuntu -i inventory -u ansible -b -K -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
- 50 ansible ubuntu -i inventory -u ansible -m command -a "ls -a /root"
- 51 ansible ubuntu -i inventory -u ansible -b -m command -a "ls -a /root"
- 52 history
Advertisement
Add Comment
Please, Sign In to add comment