forked from fgci-org/fgci-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
local.yml
81 lines (71 loc) · 3.8 KB
/
local.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
# This playbook is used with ansible-pull
#
- hosts: compute
remote_user: root
# Before the roles
pre_tasks:
- name: with setup module grab ansible_facts because printing ansible_facts stack traces see ansible github issue 7732
setup:
register: reg_pull_facts
- name: debug print reg_pull_facts
debug: var=reg_pull_facts
- name: fetch pull_variables.yml file from pull_install_ip
get_url: url="http://{{ pull_install_ip }}/pull_variables.yml" dest=/root mode=0640
tags: pull
- name: include_vars the pull_variables.yml
include_vars: /root/pull_variables.yml
tags: pull
- name: Install ansible
yum: pkg=ansible state=installed
- name: Configure a cronjob for ansible-pull
cron: name='ansible-pull' user=root
job='/bin/nice /bin/bash /usr/local/bin/ansible-pull-script.sh >/var/log/ansible.log 2>&1'
minute="{{ ansible_pull_cron_minute_interval | default('0')}}"
hour="{{ ansible_pull_cron_hour_interval | default('*/2') }}"
day="{{ ansible_pull_cron_day_interval | default('*') }}"
month="{{ ansible_pull_cron_month_interval | default('*') }}"
weekday="{{ ansible_pull_cron_weekday_interval | default('*') }}"
cron_file=ansible-pull
state={{ ansible_pull_cron_state | default('present') }}
tags: pull
roles:
- { role: watermark-release, tags: [ 'always' ] }
- { role: ansible-role-fgci-repo, tags: [ 'fgci7', 'repos' ] }
- { role: ansible-role-yum, tags: [ 'yum', 'repos', 'login' ] }
- { role: ansible-role-ohpc-repo, tags: [ 'yum', 'repos', 'ohpc' ] }
- { role: network_interface, tags: [ 'network' ] }
- { role: ansible-role-hosts-int, tags: [ 'hosts'] }
- { role: ansible-role-chrony, tags: [ 'ntp', 'chrony' ] }
- { role: ansible-role-autofs, tags: [ 'autofs' ] }
- { role: ansible-role-nis, tags: [ 'nis' ] }
- { role: ansible-role-adauth, tags: [ 'auth' ] }
- { role: ansible-role-pam, tags: [ 'auth', 'pam' ] }
- { role: ansible-role-nsswitch, tags: [ 'nsswitch', 'auth' ] }
- { role: ansible-role-yum-cron-2, tags: [ 'yumcron' ] }
- { role: ansible-role-cuda, tags: [ 'cuda', 'nvidia' ] }
- { role: ansible-role-rsyslog, tags: [ 'rsyslog' ] }
- { role: ansible-role-aliases, tags: [ 'aliases', 'email' ] }
- { role: ansible-role-postfix, tags: [ 'postfix', 'mail' ] }
- { role: ansible-role-idmapd, tags: [ 'idmapd' ] }
- { role: ansible-role-nfs_mount, tags: [ 'nfsmount' ] }
- { role: ansible-role-sshd-host-keys, tags: [ 'sshd', 'ssh', 'host-keys' ] }
- { role: ansible-role-nhc, tags: [ 'nhc', 'slurm' ] }
- { role: ansible-role-nhc-scripts, tags: [ 'nhc', 'slurm', 'nhc-scripts' ] }
- { role: ansible-role-slurm, tags: [ 'slurm' ] }
- { role: ansible-role-cvmfs, tags: [ 'cvmfs' ] }
- { role: ansible-role-rdma, tags: [ 'rdma', 'infiniband' ] }
- { role: ansible-role-system-limits, tags: [ 'limits', 'limit' ] }
- { role: ansible-role-arc-client, tags: [ 'arc', 'nordugrid' ] }
- { role: ansible-role-fgci-bash, tags: [ 'bash'] }
- { role: ansible-role-fgci-install, tags: [ 'fgci-install', 'pull'] }
- { role: ansible-role-dell, tags: [ 'dell' ] }
- { role: ansible-role-smartd, tags: [ 'smartd', 'smart' ] }
- { role: ansible-role-sshd, tags: [ 'sshd', 'ssh' ] }
- { role: ansible-role-collectd, tags: [ 'collectd', 'monitoring' ] }
- { role: ansible-role-serial-console, tags: [ 'serial', 'console' ] }
- { role: ansible-role-lustre_client, tags: [ 'lustre' ], when: lustre_client_enabled }
- { role: ansible-role-systemd-journal, tags: [ 'systemd', 'journal', 'journald' ] }
- { role: ansible-role-lldpd, tags: [ 'lldpd', 'lldp' ] }
- { role: ansible-role-singularity, tags: [ 'singularity' ] }
# Adding a role here? Make sure you add it to compute.yml for it to work with ansible push