Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- playbook: vsftpd.yml
- [ansible@control lesson4]$ 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
- 71 ../countdown 12
- 72 sudo vim /etc/ansible/hosts
- 73 cd ../
- 74 ls
- 75 cd lesson2/
- 76 ls
- 77 cat inventory
- 78 ansible -i inventory all --list-hosts
- 79 ansible -i inventory web --list-hosts
- 80 vim ansible.cfg
- 81 sudo vim /etc/ansible/ansible.cfg
- 82 pwd
- 83 vim ansible.cfg
- 84 ansible all -m command -a "chown -R ansible:ansible /home/ansible"
- 85 vim ansible.cfg
- 86 ansible all -m command -a "chown -R ansible:ansible /home/ansible"
- 87 ansible --version
- 88 vim ansible.cfg
- 89 ansible localhost -m user -a "name=lisa"
- 90 vim ansible.cfg
- 91 sudo visudo
- 92 ansible localhost -m user -a "name=lisa"
- 93 echo $EDITOR
- 94 EDIT=/usr/bin/nano
- 95 export EDITOR=/usr/bin/nano
- 96 alias nanosudo=visudo
- 97 nanosudo
- 98 sudo nanosudo
- 99 ansible all -a "id lisa"
- 100 vim inventory
- 101 ansible all -m user -a "name=linda"
- 102 ansible all -m command -a "useradd bill"
- 103 ansible all -m user -a "name=bill"
- 104 history
- 105 ansible-doc user
- 106 ../countdown 15
- 107 ansible all -m package -a "name=nmap state=latest"
- 108 ansible all -m shell -a "rpm -qa | grep nmap"
- 109 ansible all -m service -a "name=httpd state=started"
- 110 cd ../lesson4/
- 111 ls
- 112 vim install-httpd.yml
- 113 ansible-doc copy
- 114 ansible-doc sync
- 115 ansible-doc -l | grep sync
- 116 ansible-doc synchronize
- 117 ls
- 118 vim vsftpd.yml
- 119 ansible-playbook vsftpd.yml
- 120 vim vsftpd.yml
- 121 ansible-doc service
- 122 vim vsftpd.yml
- 123 ansible-playbook vsftpd.yml
- 124 vim vsftpd.yml
- 125 ansible-playbook vsftpd.yml
- 126 vim vsftpd.yml
- 127 ansible-playbook -v vsftpd.yml
- 128 vim vsftpd.yml
- 129 ansible-playbook -v vsftpd.yml
- 130 ansible-playbook -vvvv vsftpd.yml
- 131 ansible-doc chkconfig
- 132 which chkconfig
- 133 ls -l /usr/sbin/chkconfig
- 134 sudo dnf provides */ansible-lint
- 135 sudo dnf install python3-ansible-lint
- 136 ansible-lint vsftpd.yml
- 137 ansible --syntax-check vsftpd.yml
- 138 ansible -C vsftpd.yml
- 139 ansible-playbook --syntax-check vsftpd.yml
- 140 history
Advertisement
Add Comment
Please, Sign In to add comment