Bài đăng

Hiển thị các bài đăng có nhãn Ansible

[Ansible] Install the Graylog collector

This is the final post in my series on Graylog, AWS, and Ansible. In the previous three posts, I went over how to  provision ,  configure , and  install content  on an all-in-one Graylog installation using the provided AMI and Ansible to do most of the heavy lifting. In this post, I'll go over the final step: connecting a Graylog collector and syslog forwarding to begin shipping log data into the Graylog instance. Getting Started Before diving in, let's go over specifically what we want to accomplish here. I'm big on checklists, and creating an outline to organize and plan your efforts can be especially helpful when putting together new systems like this. Provision infrastructure resources (Part I) Define the instances, network resources and storage devices we'll need for the all-in-one setup. Ensure these resources are configured and secured appropriately, and connect everything together. Configure the Graylog server (Part II) Install the required pac...

[Ansible] Login server with custom SSH Information

Create file ansible_hosts with below content: [server] 104.207.128.XX  ansible_ssh_port=22   ansible_ssh_user=root   ansible_ssh_pass=133112 52.74.36.XX   ansible_ssh_port=22   ansible_ssh_user=ec2-user   ansible_ssh_pass=133112 [webserver] 104.207.128.XX  ansible_ssh_port=22   ansible_ssh_user=root   ansible_ssh_pass=133112 [email] 52.74.36.XX   ansible_ssh_port=22   ansible_ssh_user=ec2-user   ansible_ssh_pass=133112 Then run the ansible-playbook command # ansible-playbook -i ansible_hosts ping.yml

Installing Ansible from source

Installing Ansible from source is the best way to make sure that you have all the latest features and bug fixes. Fortunately, it’s nice and easy to do too. First, make sure you have any dependencies installed: sudo yum install python - 2.7 gcc-c++ python-setuptools python-devel python - yaml python - paramiko python - jinja2 python - httplib2 Next, download the code: wget http://releases.ansible.com/ansible/ansible-latest.tar.gz Then we want to install it: cd ansible- latest && make && sudo make install Now, Ansible should be installed which ansible => / usr / local / bin / ansible   [root@localhost ansible-1.9.2]# ansible --version ansible 1.9.2   Test command: # echo "127.0.0.1" > /tmp/ansible_hosts # ansible all -m ping --ask-pass -i /tmp/ansible_hosts Are you sure you want to continue connecting (yes/no)? yes 127.0.0.1 | success >> { "changed": false, "ping": "pong" }    Ins...