ansible/playbooks/hosts/cloud-noc01.fedorainfracloud.org.yml

62 lines
1.3 KiB
YAML
Raw Normal View History

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"
2014-08-26 00:31:17 +00:00
- name: make cloud noc hardware
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:
- /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
- 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
pre_tasks:
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
tasks:
- import_tasks: "{{ tasks_path }}/motd.yml"
2014-08-26 00:31:17 +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
when: '"124" not in ntp_selinux_port'
failed_when: false
tags:
- config
- selinux
- 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