Skip to content

Commit

Permalink
Merge pull request #322 from brucellino/master
Browse files Browse the repository at this point in the history
Fixing minor  issues with ARGUS role. WIP
  • Loading branch information
Bruce Becker committed May 11, 2016
2 parents db1a8c2 + 555391b commit a0be67f
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 35 deletions.
3 changes: 3 additions & 0 deletions Ansible/argus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@
- argus-pepd
- argus-pap
- argus-pdp
- name: Add Central Banning
become: true
command: pap-admin add-pap --public centralbanning lcg-argus.cern.ch "/DC=ch/DC=cern/OU=computers/CN=argus.cern.ch"
2 changes: 1 addition & 1 deletion Ansible/inventories/inventory.za-meraka
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ apel-server.c4.csir.co.za needs_certificate='true'
[voms-servers]
voms-stage.c4.csir.co.za needs_certificate='true'
[argus-servers]
argus.c4.csir.co.za emi_service='ARGUS' yaim_options='-n ARGUS_server' needs_certificate='true'
argus.c4.csir.co.za emi_service='ARGUS_server' yaim_options='-n ARGUS_server' needs_certificate='true' needs_mysql="true"
[perun]
perun.c4.csir.co.za
[CA]
Expand Down
15 changes: 15 additions & 0 deletions Ansible/roles/argus/files/etc/argus/pap/pap_configuration.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# See http://wiki.nikhef.nl/grid/Argus_Global_Banning_Setup_Overview#NGI_Argus
[paps]
centralbanning.type = remote
centralbanning.enabled = true
centralbanning.dn = /DC=ch/DC=cern/OU=computers/CN=argus.cern.ch
centralbanning.hostname = lcg-argus.cern.ch
centralbanning.port = 8150
centralbanning.path = /pap/services/
centralbanning.protocol = https
centralbanning.public = true

[paps:properties]
poll_interval = 3600 # polling time in seconds.
ordering = centralbanning
ordering = default
12 changes: 12 additions & 0 deletions Ansible/roles/argus/tasks/configure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
# ARGUS NGI configuration
- name: put the central banning config file in place
become: true
copy:
src: etc/argus/pap/pap_configuration.ini
dest: /etc/argus/pap/pap_configuration.ini

- name: restart pap
become: true
command: pap-admin refresh-cache
#when:
18 changes: 18 additions & 0 deletions Ansible/roles/argus/tasks/install.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
- name: install prerequisites
yum:
name: "{{ item }}"
state: present
with_items:
- fetch-crl
- perl-Crypt-SSLeay
tags:
- fetch-crl
- install

- name: Update CRL
command: fetch-crl
tags:
- fetch-crl
ignore_errors: true
# fetch-crl will complain about some CRLs and report "ERROR", which Ansible recognises as a failure, so we just never fail this task

- name: Install ARGUS metapackage
yum:
name: emi-argus
Expand Down
1 change: 1 addition & 0 deletions Ansible/roles/argus/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- include: install.yml
- include: configure.yml
#- include: firewall.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
-----BEGIN CERTIFICATE-----
MIIEcjCCA1qgAwIBAgICeUAwDQYJKoZIhvcNAQELBQAwLjELMAkGA1UEBhMCSVQx
DTALBgNVBAoTBElORk4xEDAOBgNVBAMTB0lORk4gQ0EwHhcNMTQwODA4MTIzODE4
WhcNMTUwODA4MTIzODE4WjBdMQswCQYDVQQGEwJJVDENMAsGA1UEChMESU5GTjEN
MAsGA1UECxMESG9zdDESMBAGA1UEBxMJWkEtTUVSQUtBMRwwGgYDVQQDExNhcmd1
cy5jNC5jc2lyLmNvLnphMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
7dSMtIovuMNZNEcdRM/1W51578B4Glvznih/c15OOQxmBtvnkHgbJIN2BSoNeOAL
JlinRzZum6cwp7b8ozxlKJ7ink52Xc/rSlYmYrgpgHRu5ktlAlB5mj5So3uVhDNi
+mYIw2nTSDiCJIRQQZAQXCaTypbgHcSOKQSNNuY7bl+6wvV3gPYCQozm1HNAsp6Q
BKjcJvvA/1MqZT5FIray7KljcHCxDpgPM/kaUISxxEalYmtx6BLK711SBcMpse+n
gg0dYg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wUAA4IBAQCCl5se3S3x52TFokUC0in7UDAlwOCAU6W2
P0YupLvcMsHnmsiVNO7NEtuiiZARltP189+u8G4ZqT8BUPS+mdtBzf5on8QzeFvR
UhadGZtB3M904F/Qv6F7lsDyHQi7GOnzbpD7buT/XWGHuSGBquIV5ALDYgbDLHke
h8oU2rrUrcr85SyNBnevNu5QpuIHDf+yoAL4ThxZTMR3J7JcfUzHoJ3SK/N1bLtG
p6fTYAqSM8J0FonCYh3scsop+Ywhf7FKvtd2NAw0HO5fs9AfvGVfJDoyioH2JmxY
TCBXADP8mWgdeGWpEEhIi+maRRuhhLnOzYEdMKYcR0vTIj/lmFYc
-----END CERTIFICATE-----
12 changes: 9 additions & 3 deletions Ansible/roles/common/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
---
- name: restart ntpd
become: true
service:
name: ntpd
state: restarted

# - name: restart iptables
# service: name=iptables state=restarted
# when: ansible_os_family == 'RedHat'
- name: restart iptables
become: true
service:
name: iptables
state: restarted
when: ansible_os_family == 'RedHat'

- name: update yum
become: true
yum:
name: "*"
state: latest

- name: restart sshd
become: true
service:
name: sshd
state: restarted
16 changes: 10 additions & 6 deletions Ansible/roles/top-bdii/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
---
#- name: restart ntpd
#service: name=ntpd state=restarted
#sudo: yes
#- name: restart iptables
#sudo: yes
#service: name=iptables state=restarted
- name: restart ntpd
become: true
service:
name: ntpd
state: restarted
- name: restart iptables
become: true
service:
name: iptables
state: restarted

0 comments on commit a0be67f

Please sign in to comment.