Split jenkins-dev host group into jenkins-master and jenkins-slave
This commit is contained in:
parent
2b190f34c6
commit
10c3c2eb83
4 changed files with 48 additions and 8 deletions
|
@ -17,8 +17,6 @@ cloud_networks:
|
|||
# persistent-net
|
||||
- net-id: "67b77354-39a4-43de-b007-bb813ac5c35f"
|
||||
|
||||
jenkins_master: True
|
||||
|
||||
tcp_ports: [ 8080 ]
|
||||
|
||||
custom_nat_rules: [
|
||||
|
|
|
@ -886,8 +886,10 @@ jenkins-slaves
|
|||
#
|
||||
# These are in the new cloud
|
||||
#
|
||||
[jenkins-dev]
|
||||
[jenkins-master]
|
||||
jenkins.fedorainfracloud.org
|
||||
|
||||
[jenkins-slave]
|
||||
jenkins-slave-el6.fedorainfracloud.org
|
||||
jenkins-slave-el7.fedorainfracloud.org
|
||||
jenkins-slave-f22.fedorainfracloud.org
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- name: check/create instance
|
||||
hosts: jenkins-dev
|
||||
hosts: jenkins-master
|
||||
gather_facts: False
|
||||
|
||||
vars_files:
|
||||
|
@ -12,7 +12,7 @@
|
|||
- include: "{{ tasks }}/persistent_cloud_new.yml"
|
||||
|
||||
- name: setup all the things
|
||||
hosts: jenkins-dev
|
||||
hosts: jenkins-master
|
||||
gather_facts: True
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
|
@ -27,7 +27,7 @@
|
|||
- include: "{{ tasks }}/yumrepos.yml"
|
||||
|
||||
- name: provision instance
|
||||
hosts: jenkins-dev
|
||||
hosts: jenkins-master
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "/srv/private/ansible/vars.yml"
|
||||
|
@ -35,8 +35,7 @@
|
|||
|
||||
roles:
|
||||
- base
|
||||
- { role: jenkins/master, when: jenkins_master is defined }
|
||||
- { role: jenkins/slave, when: jenkins_master is not defined }
|
||||
- jenkins/master
|
||||
|
||||
handlers:
|
||||
- include: "{{ handlers }}/restart_services.yml"
|
41
playbooks/groups/jenkins-slave.yml
Normal file
41
playbooks/groups/jenkins-slave.yml
Normal file
|
@ -0,0 +1,41 @@
|
|||
- name: check/create instance
|
||||
hosts: jenkins-slave
|
||||
gather_facts: False
|
||||
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- /srv/private/ansible/vars.yml
|
||||
- /srv/web/infra/ansible/vars/fedora-cloud.yml
|
||||
- /srv/private/ansible/files/openstack/passwords.yml
|
||||
|
||||
tasks:
|
||||
- include: "{{ tasks }}/persistent_cloud_new.yml"
|
||||
|
||||
- name: setup all the things
|
||||
hosts: jenkins-slave
|
||||
gather_facts: True
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- /srv/private/ansible/vars.yml
|
||||
- /srv/private/ansible/files/openstack/passwords.yml
|
||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
pre_tasks:
|
||||
- include: "{{ tasks }}/cloud_setup_basic.yml"
|
||||
- name: set hostname (required by some services, at least postfix need it)
|
||||
shell: "hostname {{inventory_hostname}}"
|
||||
- include: "{{ tasks }}/yumrepos.yml"
|
||||
|
||||
- name: provision instance
|
||||
hosts: jenkins-slave
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "/srv/private/ansible/vars.yml"
|
||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
roles:
|
||||
- base
|
||||
- jenkins/slave
|
||||
|
||||
handlers:
|
||||
- include: "{{ handlers }}/restart_services.yml"
|
Loading…
Add table
Add a link
Reference in a new issue