Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ansible@control ansiblefundamentals]$ history
- 1 ip a
- 2 sudo vim /etc/hosts
- 3 ping ansible1
- 4 ping ansible2
- 5 sudo hostnamectl set-hostname control.example.com
- 6 exit
- 7 cat /etc/hosts
- 8 free -m
- 9 df -h
- 10 sudo dnf install ansible-core
- 11 ansible --version
- 12 whoami
- 13 sudo ls /root
- 14 cat /etc/hosts
- 15 ansible --version
- 16 ssh root@ansible1
- 17 ssh root@ansible2
- 18 cat > inventory << EOF
- ansible1
- ansible2
- EOF
- 19 cat inventory
- 20 ansible -i inventory all -u root -k -m command -a "useradd ansible"
- 21 ansible -i inventory all -u root -k -m shell -a "echo password | passwd --stdin ansible"
- 22 ansible -i inventory all -u root -k -m command -a "rpm -qa | grep tools"
- 23 ansible -i inventory all -u root -k -m shell -a "rpm -qa | grep tools"
- 24 ansible -i inventory all -u ansible -k -m command -a "whoami"
- 25 ansible -i inventory all -u ansible -k -m command -a "ls -l /root"
- 26 ansible -i inventory all -u root -k -m copy -a 'content="ansible ALL=(ALL) NOPASSWD: ALL" dest=/etc/sudoers.d/ansible'
- 27 ansible -i inventory all -u ansible -k -m command -a "ls -l /root"
- 28 ansible -i inventory all -u ansible -k -b -m command -a "ls -l /root"
- 29 history
- 30 ssh-keygen
- 31 ssh-copy-id ansible1
- 32 ssh-copy-id ansible2
- 33 ansible -i inventory all -u ansible -b -m command -a "ls -l /root"
- 34 cd ansiblefundamentals/
- 35 ls
- 36 vim ansible.cfg
- 37 ansible all -a "whoami"
- 38 cat ansible.cfg
- 39 cp ../inventory ..
- 40 cp ../inventory .
- 41 ansible all -a "whoami"
- 42 ansible-doc -l
- 43 ansible-doc -l | wc
- 44 ansible-galaxy collection install ansible.windows
- 45 ansible-doc -l | wc
- 46 ansible-doc -l
- 47 pwd
- 48 ls
- 49 ansible all -m ping
- 50 ansible all -m user -a "name=lisa"
- 51 ansible-doc user
- 52 ansible all -m command -a "id lisa"
- 53 ansible all -m user -a "name=lisa state=absent"
- 54 ansible all -m copy -a "src=/etc/hosts dest=/etc/hosts"
- 55 ansible all -a "cat /etc/hosts"
- 56 ansible ansible1 -m command -a "rpm -qa | grep python"
- 57 ansible ansible1 -m shell -a "rpm -qa | grep python"
- 58 ansible all -m copy -a 'content="hello world" dest=/etc/motd'
- 59 ansible all -a "cat /etc/motd"
- 60 ansible all -m dnf -a "name=nmap state=latest"
- 61 ansible all -m service -a "name=httpd state=started enabled=yes"
- 62 ansible ansible1 -m command -a "useradd bob"
- 63 ansible ansible1 -m user -a "name=bob"
- 64 vim install_and_start_httpt.yaml
- 65 ansible-playbook install_and_start_httpt.yaml
- 66 vim enforce-selinux.yml
- 67 ansible-playbook enforce-selinux.yml
- 68 history | grep collection
- 69 ansible-galaxy collection install ansible.posix
- 70 ansible-playbook enforce-selinux.yml
- 71 vim enforce-selinux.yml
- 72 ansible-playbook enforce-selinux.yml
- 73 vim enforce-selinux-simplified.yml
- 74 ansible-playbook enforce-selinux-simplified.yml
- 75 ./countdown 12
- 76 ansible-doc -l
- 77 ansible-doc -l | grep firewalld
- 78 ansible-doc ansible.posix.firewalld
- 79 vim install_and_start_httpt.yaml
- 80 ansible-playbook install_and_start_httpt.yaml
- 81 ansible-doc ansible.posix.firewalld
- 82 vim install_and_start_httpt.yaml
- 83 ansible-playbook install_and_start_httpt.yaml
- 84 ansible -a "firewall-cmd --list-all"
- 85 ansible -a "firewall-cmd list-all"
- 86 firewall-cmd --list-all
- 87 ansible all -a "firewall-cmd --list-all"
- 88 ansible-doc -l | grep posix
- 89 vim run_and_test_httpd.yaml
- 90 ansible-playbook run_and_test_httpd.yaml
- 91 vim run_and_test_httpd.yaml
- 92 ansible-playbook run_and_test_httpd.yaml
- 93 vim run_and_test_httpd.yaml
- 94 vim multi_play.yaml
- 95 ansible-playbook multi_play.yaml
- 96 vim multi_play.yaml
- 97 ansible-doc yum
- 98 vim multi_play.yaml
- 99 ansible-playbook multi_play.yaml
- 100 sudo dnf provides */ansible-lint
- 101 ansible-playbook playbook_with_errors.yaml
- 102 vim playbook_with_errors.yaml
- 103 ansible-playbook playbook_with_errors.yaml
- 104 vim playbook_with_errors.yaml
- 105 ansible-playbook playbook_with_errors.yaml
- 106 vim playbook_with_errors.yaml
- 107 vim variables_example.yaml
- 108 ansible-playbook variables_example.yaml
- 109 ansible ansible1 -a "hostname"
- 110 ansible ansible1 -a "hostnamectl set-hostname ansible1.example.com"
- 111 ansible ansible1 -a "hostname"
- 112 ansible ansible2 -a "hostnamectl set-hostname ansible2.example.com"
- 113 ansible-playbook variables_example.yaml
- 114 vim gather_facts.yaml
- 115 ansible-playbook variables_example.yaml
- 116 ansible-playbook gather_facts.yaml
- 117 ansible ansible1 -m setup > facts.txt
- 118 less facts.txt
- 119 vim old_facts.yaml
- 120 ansible-playbook old_facts.yaml
- 121 vim new_facts.yaml
- 122 ansible-playbook new_facts.yaml
- 123 vim new_facts.yaml
- 124 ./countdown 12
- 125 vim vars_file.yaml
- 126 ansible-playbook vars_file.yaml
- 127 vim vars/common
- 128 ansible-playbook vars_file.yaml
- 129 ls
- 130 mkdir group_vars
- 131 vim group_vars/all
- 132 vim vars_file.yaml
- 133 ansible-playbook vars_file.yaml
- 134 cat group_vars/all
- 135 vim register.yaml
- 136 ansible-playbook register.yaml
- 137 vim register.yaml
- 138 ansible-playbook register.yaml
- 139 vim register.yaml
- 140 ansible-playbook register.yaml
- 141 vim loop_packages.yaml
- 142 ansible-playbook loop_packages.yaml
- 143 vim loop_on_vars.yaml
- 144 cat loop_on_vars.yaml
- 145 cat vars/users-list
- 146 ansible-playbook loop_on_vars.yaml
- 147 vim when_test.yaml
- 148 ansible-playbook when_test.yaml
- 149 vim when_test.yaml
- 150 vim when_complex.yaml
- 151 ansible-playbook when_complex.yaml
- 152 ansible-playbook -vv when_complex.yaml
- 153 vim when_register.yaml
- 154 ansible-playbook when_register.yaml
- 155 vim using_handlers.yaml
- 156 ansible-playbook using_handlers.yaml
- 157 vim using_handlers.yaml
- 158 ansible-playbook using_handlers.yaml
- 159 vim using_handlers.yaml
- 160 ansible-playbook using_handlers.yaml
- 161 ansible all -m file -a "name=/var/www/html/index.html state=absent"
- 162 ansible-playbook using_handlers.yaml
- 163 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement