This commit is contained in:
Oleg Mykolaishyn 2021-03-26 14:00:22 +02:00
parent e8ebcbb6f5
commit 83479b8b79
5 changed files with 0 additions and 166 deletions

View file

@ -1,47 +0,0 @@
---
- name: Docker push
hosts: agent-1
become: yes
tasks:
- name: Install python3
apt:
name: python3-pip
state: present
- name: docker-py
pip:
name: docker-py
state: absent
- name: install docker pip
pip:
name: docker
state: present
- name: Install docker
apt:
name: docker.io
state: present
update_cache: yes
- name: Setting mode for docker.sock
shell: sudo chmod 666 /var/run/docker.sock
- name: Docker service started
service:
name: docker
state: started
- name: Docker prune
docker_container:
name: spring-petclinic
state: absent
- name: Start the container
docker_container:
name: spring-petclinic
image: "owlleg68/spring-petclinic:latest"
state: started
published_ports:
- 0.0.0.0:8082:8080

View file

@ -1,39 +0,0 @@
---
- name: Setup builder instance
hosts: builder
become: yes
tasks:
#=========Git===========
- name: Install Git
apt:
name: git
state: present
update_cache: yes
#============Java======
- name: Install Java-8
apt:
name: openjdk-8-jdk
state: present
#============Maven========
- name: Install Maven
apt:
name: maven
state: present
#=========Docker==========
- name: Install docker
apt:
name: docker.io
state: present
update_cache: yes
- name: Setting mode for docker.sock
shell: sudo chmod 666 /var/run/docker.sock
~
~

View file

@ -1,54 +0,0 @@
---
- name: Setup dev-tools instance
hosts: dev-tools
become: yes
tasks:
#=========Git===========
- name: Install Git
apt:
name: git
state: present
update_cache: yes
#============Java======
- name: Install Java-8
apt:
name: openjdk-8-jdk
state: present
#============Maven========
- name: Install Maven
apt:
name: maven
state: present
#=======Jenkins=======
- name: Wget url
shell: wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
- name: Adding to list
shell: sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
- name: Install Jenkins
apt:
name: jenkins
state: present
update_cache: yes
- name: Start jenkins
service:
name: jenkins
state: started
- name: init password jenkin
shell: sudo cat /var/lib/jenkins/secrets/initialAdminPassword
changed_when: false
register: result
- name: print init password jenkins
debug:
var: result.stdout

View file

@ -1,26 +0,0 @@
#===============================
[dev-tools]
35.198.158.96
[dev-tools:vars]
ansible_user=owlleg6
ansible_ssh_private_key_file=/home/owlleg6/.ssh/ansible-key.pem
#===========================
[builder]
34.89.200.191
[builder:vars]
ansible_user=owlleg6
ansible_ssh_private_key_file=/home/owlleg6/.ssh/ansible-key.pem
#==============
[agent-1]
35.223.139.130
[agent-1:vars]
ansible_user=owlleg6
ansible_ssh_private_key_file=/home/owlleg6/.ssh/ansible-key.pem

Binary file not shown.