2014-08-26 00:31:17 +00:00
|
|
|
# This is a basic playbook
|
|
|
|
|
2023-05-18 16:29:58 -04:00
|
|
|
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml"
|
|
|
|
vars:
|
|
|
|
myhosts: "cloud-noc01.fedorainfracloud.org"
|
2019-08-21 15:56:09 +00:00
|
|
|
|
2014-08-26 00:31:17 +00:00
|
|
|
- name: make cloud noc hardware
|
2020-03-17 19:42:41 +00:00
|
|
|
hosts: cloud-noc01.fedorainfracloud.org
|
2014-08-26 00:31:17 +00:00
|
|
|
user: root
|
|
|
|
gather_facts: True
|
|
|
|
|
2016-08-08 19:36:31 +00:00
|
|
|
vars_files:
|
2022-06-13 17:06:33 -07:00
|
|
|
- /srv/web/infra/ansible/vars/global.yml
|
|
|
|
- "/srv/private/ansible/vars.yml"
|
|
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
2014-08-26 00:31:17 +00:00
|
|
|
|
|
|
|
roles:
|
|
|
|
- base
|
|
|
|
- rkhunter
|
2017-05-05 22:12:33 +00:00
|
|
|
- nagios_client
|
2014-08-26 00:31:17 +00:00
|
|
|
- hosts
|
|
|
|
- collectd/base
|
|
|
|
- sudo
|
2014-08-26 20:23:17 +00:00
|
|
|
- dhcp_server
|
|
|
|
- tftp_server
|
2014-08-26 00:31:17 +00:00
|
|
|
|
2018-10-30 18:28:26 +00:00
|
|
|
pre_tasks:
|
2017-10-17 17:37:03 +00:00
|
|
|
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
|
2018-10-30 18:28:26 +00:00
|
|
|
|
|
|
|
tasks:
|
2017-10-17 17:37:03 +00:00
|
|
|
- import_tasks: "{{ tasks_path }}/motd.yml"
|
2014-08-26 00:31:17 +00:00
|
|
|
|
2019-05-08 22:49:55 +00:00
|
|
|
- name: check if ntpd port is already known by selinux
|
|
|
|
shell: semanage port -l | grep ntp
|
|
|
|
register: ntp_selinux_port
|
|
|
|
check_mode: no
|
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
|
|
|
tags:
|
|
|
|
- config
|
|
|
|
- selinux
|
|
|
|
|
|
|
|
- name: allow alternate ntpd port
|
|
|
|
command: semanage port -a -t ntp_port_t -p tcp 124
|
2019-05-08 22:51:54 +00:00
|
|
|
when: '"124" not in ntp_selinux_port'
|
2019-05-08 22:49:55 +00:00
|
|
|
failed_when: false
|
|
|
|
tags:
|
|
|
|
- config
|
|
|
|
- selinux
|
|
|
|
|
2019-05-16 17:39:34 +02:00
|
|
|
- name: allow alternate ntpd port
|
|
|
|
command: semanage port -a -t ntp_port_t -p udp 124
|
|
|
|
when: '"124" not in ntp_selinux_port'
|
|
|
|
failed_when: false
|
|
|
|
tags:
|
|
|
|
- config
|
|
|
|
- selinux
|
|
|
|
|
2014-08-26 00:31:17 +00:00
|
|
|
handlers:
|
2017-10-15 20:33:11 +00:00
|
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
2014-08-26 00:31:17 +00:00
|
|
|
|