Skip to content

Commit

Permalink
Initial Zabbix.hayaworld.local playbook
Browse files Browse the repository at this point in the history
  • Loading branch information
cradle8810 committed May 4, 2024
1 parent e2b292e commit 11650fe
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 3 deletions.
1 change: 1 addition & 0 deletions inventories/host_vars/jenkins.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
6 changes: 3 additions & 3 deletions inventories/hosts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
[docker]
192.168.1.107 ansible_user=hayato

[jenkins]
192.168.1.111 ansible_user=hayato

[tm]
192.168.1.112 ansible_user=hayato

[jenkins]
192.168.1.131 ansible_user=hayato

[skylark]
192.168.1.200 ansible_user=hayato

Expand Down
51 changes: 51 additions & 0 deletions jenkins.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
- name: Play for jenkins.hayaworld.local
hosts: jenkins
remote_user: hayato
gather_facts: true
become: true

vars_files:
- inventories/host_vars/jenkins.yml
- inventories/host_vars/networks.yml

tasks:
- name: Set Hostname
ansible.builtin.hostname:
name: "{{ network.jenkins.hostname }}"
tags:
- network

- name: Put authorized Key
ansible.builtin.import_tasks:
file: tasks/authorized_keys.yml

- name: Put motd file
ansible.builtin.import_tasks:
file: tasks/motd.yml
vars:
shortname: "{{ network.jenkins.shortname }}"

- name: Disable SELinux
ansible.builtin.import_tasks:
file: tasks/stop-selinux.yml

- name: Set Timezones
ansible.builtin.import_tasks:
file: tasks/timezone.yml

- name: Set zabbix agent
ansible.builtin.import_tasks:
file: tasks/zabbix-agent2.yml

- name: Stop Apt-daily
ansible.builtin.import_tasks:
file: tasks/stop-apt-daily.yml

- name: Stop cloud-init
ansible.builtin.import_tasks:
file: tasks/stop-cloud-init.yml

- name: Stop multipathd logging when running on VM
ansible.builtin.import_tasks:
file: tasks/stop-multipathd-syslog.yml
6 changes: 6 additions & 0 deletions templates/jenkins/etc/motd
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
_ _ _
(_) ___ _ __ | | _(_)_ __ ___
| |/ _ \ '_ \| |/ / | '_ \/ __|
| | __/ | | | <| | | | \__ \
_/ |\___|_| |_|_|\_\_|_| |_|___/
|__/

0 comments on commit 11650fe

Please sign in to comment.