-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Customization of the prometheus asnible roles
- Loading branch information
Showing
8 changed files
with
85 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../99_newhost/ansible/01_prepare_nodes.yaml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
- name: Set global variables | ||
set_fact: | ||
virbr: "8" | ||
netsuffix: "26" | ||
hostname: "pgdb95" | ||
domain: "lab.local" | ||
mem: "4G" | ||
ipaserver: "freeipa.lab.local" | ||
ipaip: "10.1.8.10" | ||
ldapbase: "dc=lab,dc=local" | ||
svcadmin: "admin" | ||
adminpwd: "admin123" | ||
template: "t_centos7" | ||
template_dir: "/data/templates" | ||
vms_dir: "/data/vms" | ||
|
||
- name: Set ip | ||
set_fact: | ||
ip: "10.1.{{ virbr }}.{{ netsuffix }}" | ||
|
||
|
||
|
||
- name: Set FQDN | ||
set_fact: | ||
fqdn: "{{ hostname }}.{{ domain }}" | ||
|
||
- name: Set REALM | ||
set_fact: | ||
realm: "{{ domain|upper }}" |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
- hosts: localhost | ||
become: true | ||
gather_facts: no | ||
tasks: | ||
|
||
- name: Set variables | ||
include: include/_setup_vars.yaml | ||
|
||
- name: "Create ansible group for new hosts" | ||
add_host: name="{{ master }}" groups=newhost | ||
|
||
- hosts: newhost | ||
become: true | ||
gather_facts: no | ||
tasks: | ||
|
||
- name: Set variables | ||
include: include/_setup_vars.yaml | ||
|
||
- name: Copy cluster.ini | ||
shell: cp /root/gshipley/cluster.ini /root/gshipley/prometheus.ini | ||
|
||
- name: Add new hosts | ||
shell: echo "[new_nodes]" >> /root/gshipley/prometheus.ini ; echo "{{ fqdn }} openshift_node_group_name='node-config-prometheus'" >> /root/gshipley/prometheus.ini | ||
|
||
- name: Add section new nodes | ||
shell: cd /root/gshipley ; sed -i -E 's/nodes$/nodes\nnew_nodes/' prometheus.ini | ||
|
||
- name: Add host to ansible host | ||
shell: echo "{{ fqdn }}" >> /etc/ansible/hosts | ||
|
||
- name: setting up the node group | ||
shell: cd /root/gshipley ; ansible-playbook -i prometheus.ini openshift-ansible/playbooks/openshift-master/openshift_node_group.yml | ||
|
||
- name: Add new node to the cluster | ||
shell: cd /root/gshipley ; ansible-playbook -i prometheus.ini openshift-ansible/playbooks/openshift-node/scaleup.yml |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,3 +33,7 @@ | |
- name: Set disksize | ||
set_fact: | ||
disksize: "51G" | ||
|
||
- name: Set ocp master | ||
set_fact: | ||
master: "node11.lab.local" |