Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
extract of the cream-ce play.
- hosts: cream-ces
name: run YAIM for CREAM-CE on head node
user: ansible
sudo: true
pre_tasks:
- name: Announce the play via Slack
action:
module: slack
domain: africa-arabia-roc.slack.com
token: 6EJfIMngdMiwrmnScAA4znB5
msg: "Running YAIM play on {{ inventory_hostname }} at {{ site_name }}"
channel: "#devopssite"
username: "Ansible on {{ inventory_hostname }}"
#icon_url: "http://www.example.com/some-image-file.png"
link_names: 1
parse: 'full'
tags:
- slack
roles:
- yaim
vars_files:
- group_vars/passwords-{{ site_name }}.yml
post_tasks:
- name: Restart trqauthd
sudo: true
service: name=trqauthd state=started
- name: Remove queue CPU time limits
sudo: true
action: "raw /usr/bin/qmgr -c 'unset queue {{ item.name }} resources_max.cput'"
with_items: qmgr_queues
notify:
- restart pbs_server
- name: Set Max Walltime limits
sudo: true
action: "raw /usr/bin/qmgr -c 'set queue {{ item.name }} resources_max.walltime = {{ item.max_wall_time }}'"
with_items: qmgr_queues
notify:
- restart pbs_server
- name: Set Queue default walltime
action: "raw /usr/bin/qmgr -c 'set queue {{ item.name }} resources_default.walltime = {{ item.max_wall_time }}'"
sudo: true
with_items:
- qmgr_queues
notify:
- restart pbs_server
# - name: fix Proxy_to_sandbox_dir
# sudo: true
# action: copy src=config/files/usr/bin/glite-cream-copyProxyToSandboxDir.sh dest=/usr/bin/glite-cream-copyProxyToSandboxDir.sh owner=root group=root mode=755
- name: restart munge
sudo: true
service: name=munge state=restarted
- name: restart pbs_server
sudo: true
action: service name=pbs_server state=restarted enabled=yes
- name: Announce the play via Slack
action:
module: slack
domain: africa-arabia-roc.slack.com
token: "{{ slack_token }}"
msg: "Finished CREAM-CE playbook on {{ inventory_hostname }} at {{ site_name }} sucessfully :ok_hand:"
channel: "#devopssite"
username: "Ansible on {{ inventory_hostname }}"
link_names: 1
parse: 'full'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.