Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ssh student@ansible2
- 7 ssh tower@ansible2
- 8 ssh student@tower
- 9 ssh student@ubuntu
- 10 mkdir setup
- 11 cd setup
- 12 vim inventory
- 13 sudo dnf install epel-release
- 14 sudo dnf install -y ansible
- 15 history
- 16 ansible --version
- 17 ansible -i inventory all -m user -a "name=ansible" -u student
- 18 ansible -i inventory all -m user -a "name=ansible" -u student -k
- 19 useradd ansible
- 20 useradd bob
- 21 sudo useradd student
- 22 sudo passwd student
- 23 ssh student@tower
- 24 ansible -i inventory all -m user -a "name=ansible" -u student -k
- 25 ansible -i inventory all -m user -a "name=ansible" -u student -k -b -K
- 26 sudo usermod -aG wheel student
- 27 ansible -i inventory all -m user -a "name=ansible" -u student -k -b -K
- 28 history
- 29 cd ..
- 30 sudo dnf -y git
- 31 sudo dnf install -y git
- 32 git clone https://github.com/sandervanvugt/luth
- 33 cd luth
- 34 ./countdown 12
- 35 #ansible -i inventory ubuntu -m shell -a 'echo "ansible:password" | chpasswd' -u student -b -k -K
- 36 cd ../setup/
- 37 ansible -i inventory ubuntu -m shell -a 'echo "ansible:password" | chpasswd' -u student -b -k -K
- 38 vim inventory
- 39 ansible -i inventory rhfamily -m shell -a "echo password | passwd --stdin ansible" -u root -k
- 40 cat inventory
- 41 ssh-keygen
- 42 historyt
- 43 history
- 44 ssh-copy-id
- 45 ssh-copy-id ansible1
- 46 ssh-copy-id ansible2
- 47 ssh-copy-id tower
- 48 ssh-copy-id ubuntu
- 49 ssh-copy-id control
- 50 history
- 51 ansible all -i inventory -m command -a "id" -u ansible
- 52 sudo visudo
- 53 ansible-doc copy
- 54 #ansible -i inventory ubuntu -m copy -a "content='ansible ALL=(ALL) ALL' dest=/etc/sudoers.d/ansible validate='/usr/bin/visudo -cd %S'" -u student -b -K
- 55 ansible-doc copy
- 56 ansible -i inventory ubuntu -m copy -a "content='ansible ALL=(ALL) ALL' dest=/etc/sudoers.d/ansible validate='/usr/bin/visudo -cf %S'" -u student -b -K
- 57 ansible -i inventory ubuntu -m copy -a "content='ansible ALL=(ALL) ALL' dest=/etc/sudoers.d/ansible validate='/usr/bin/visudo -cf %S'" -u student -b -k -K
- 58 ansible -i inventory ubuntu -m copy -a "content='ansible ALL=(ALL) ALL' dest=/etc/sudoers.d/ansible validate='/usr/bin/visudo -cf %s'" -u student -b -k -K
- 59 ansible -i inventory ubuntu -a "which visudo" -k -b -K -u student
- 60 ansible -i inventory ubuntu -m copy -a "content='ansible ALL=(ALL) ALL' dest=/etc/sudoers.d/ansible validate='/usr/sbin/visudo -cf %s'" -u student -b -k -K
- 61 ansible -i inventory ubuntu -a "id" -u ansible -b -K
- 62 history
- 63 ansible -i inventory rhfamily -m copy -a "content='ansible ALL=(ALL) ALL' dest=/etc/sudoers.d/ansible validate='/usr/sbin/visudo -cf %s'" -u student -b -k -K
- 64 cd ..
- 65 git clone https://github.com/sandervanvugt/ansiblein3weeks
- 66 cd ansiblein3weeks/
- 67 ls
- 68 history
- 69 vim ansible.cfg
- 70 ansible all -a "id"
- 71 cat ansible.cfg
- 72 sleep 120; ./countdown 10
- 73 ls
- 74 cd task_control/
- 75 ls
- 76 vim handlers.yml
- 77 echo hello > /tmp/index.html
- 78 ansible-playbook handlers.yml
- 79 pwd
- 80 cp ../../setup/inventory .
- 81 ansible-playbook handlers.yml
- 82 ls
- 83 cp ../ansible.cfg .
- 84 ansible-playbook handlers.yml
- 85 vim handlers.yml
- 86 history
- 87 ansible-playbook handlers.yml
- 88 ansible all -m file -a "name=/var/www/html/index.html state=absent"
- 89 ansible-playbook handlers.yml
- 90 vim handlers.yml
- 91 ansible all -m copy -a "src=/etc/hosts dest=/etc/hosts"
- 92 ansible-playbook handlers.yml
- 93 vim handlers.yml
- 94 ansible-playbook handlers.yml
- 95 ls
- 96 vim ifsize.yml
- 97 vim when_multiple.yml
- 98 ansible-playbook when_multiple.yml
- 99 vim when_multiple.yml
- 100 ansible-playbook when_multiple.yml
- 101 ls
- 102 cd ..
- 103 ls
- 104 vim register.yaml
- 105 ansible-playbook register.yaml
- 106 vim register.yaml
- 107 ansible-playbook register.yaml
- 108 ansible ubuntu -m command -a "useradd -m linda"
- 109 cp ../setup/inventory .
- 110 ls
- 111 vim ansible.cfg
- 112 ansible ubuntu -m command -a "useradd -m linda"
- 113 ansible ansible1 -m command -a "useradd -m linda"
- 114 ansible ansible1 -m user -a "name=linda"
- 115 ansible ansible1 -m user -a "name=linda state=absent"
- 116 ansible ansible1 -m user -a "name=linda"
- 117 ls
- 118 grep -R block *
- 119 vim setup.yaml
- 120 vim listing731.yaml
- 121 ansible-playbook listing731.yaml
- 122 vim listing731.yaml
- 123 ls
- 124 ./countdown 18
- 125 ansible --version
- 126 ansible-doc -l | grep docker
- 127 ansible-galaxy collection install community.docker
- 128 yum module list
- 129 history
Advertisement
Add Comment
Please, Sign In to add comment