This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
tasks: | |
- name: success bar.yml | |
shell: /bin/true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[web1] | |
host_patern01 | |
host_patern02 | |
host_patern03 | |
[web2] | |
host_patern04 | |
host_patern05 | |
host_patern06 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: server_ip | |
gather_facts: no | |
remote_user: root | |
tasks: | |
# this task will run to the remote host, ie server_ip, so it will try to perform an "ssh -i server_ip" from the host itself. | |
- name: check devise status | |
shell: ssh -i server_ip "show vd" | |
register: output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f2f35da2716d logstash "/docker-entrypoint.s" 32 seconds ago Up 31 seconds logstash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ansible-playbook mysql.yml --limit test-206 -b -v | |
PLAY [all] ******************************************************************** | |
GATHERING FACTS *************************************************************** | |
ok: [test-206] | |
TASK: [mysql | apt-get stuff] ************************************************* | |
changed: [test-206] => (item=mysql-server,python-mysqldb) => {"changed": true, "item": "mysql-server,python-mysqldb", "stderr": "\rProxy that will be used: h | |
ttp://deploy-jenkins.decibelinsight.net:3128\nmysql start/running, process 2496\n", "stdout": "Reading package lists...\nBuilding dependency tree...\nReading |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: apt-get stuff | |
apt: name={{ item }} update_cache=yes cache_valid_time="86400" | |
sudo: yes | |
with_items: | |
- mysql-server | |
- python-mysqldb | |
register: apt_get | |
- name: test root password | |
shell: mysql -uroot -p{{ mysql_root_pass }} -e 'show databases;' &> /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 - name: get httpd.git | |
5 git: | |
6 repo=https://{{ git_cred }}@xxxxx | |
7 dest=/root/xxxx | |
8 accept_hostkey=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
connection: local | |
roles: | |
- awesome |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: pip install required stuff | |
sudo: no | |
remote_user: jenkins | |
pip: name={{ item }} extra_args="--user --upgrade" | |
with_items: | |
- sh | |
- netaddr | |
- unittest-xml-reporting | |
tags: pip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# Based heavily on the Ansible documentation on EC2: | |
# http://docs.ansible.com/ec2_module.html | |
- name: Provision an EC2 node | |
hosts: localhost | |
connection: local | |
gather_facts: False | |
tags: provisioning | |
vars: | |
instance_type: t1.micro |