Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [student@localhost ~]$ history
- 1 free -m
- 2 sudo hostnamectl set-hostname control.example.com
- 3 exit
- 4 sudo hostnamectl set-hostname control.example.com
- 5 su -
- 6 su - ansible
- 7 history
- [student@localhost ~]$ su - ansible
- Password:
- [ansible@control ~]$ history
- 1 ip a
- 2 sudo vim /etc/hosts
- 3 ping ubuntu
- 4 sudo dnf install ansible-core
- 5 ansible --version
- 6 vim inventory
- 7 ansible -i inventory all -u student -k -b -K -m command -a "useradd ansible"
- 8 ssh student@ansile1
- 9 ssh student@ansible1
- 10 ssh student@ansible2
- 11 ssh student@ubuntu
- 12 ansible -i inventory all -u student -k -b -K -m command -a "useradd ansible"
- 13 ansible -i inventory all -u student -k -b -K -m user -a "name=ansible state=present"
- 14 history
- 15 ansible -i inventory all -u student -k -b -K -m shell "echo password | passwd --stdin ansible"
- 16 ansible -i inventory all -u student -k -b -K -m shell -a "echo password | passwd --stdin ansible"
- 17 sudo visudo
- 18 ansible -i inventory all -u student -k -b -K -m copy -a 'content="ansible ALL=(ALL) NOPASSWD: ALL" dest=/etc/sudoers.d/ansible'
- 19 ansible -i inventory all -u ansible -k -b -m command -a "ls -l /root"
- 20 sudo dnf install -y git
- 21 git clone https://github.com/sandervanvugt/ansiblein3weeks
- 22 history
- 23 cd ansiblein3weeks/
- 24 ls
- 25 cd basics/
- 26 ls
- 27 cd ..
- 28 vim ansible.cfg
- 29 cp ../inventory .
- 30 ansible all -k -a "ls -l /root"
- 31 ssh-keygen
- 32 ssh-copy-id ansible1
- 33 ssh-copy-id ansible2
- 34 ssh-copy-id ubuntu
- 35 history
- 36 exit
- 37 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement