Add a fas-client setup task. Add a common-scripts task. Setup arm-releng/arm-qa groups to use them.

This commit is contained in:
Kevin Fenzi 2013-04-12 17:44:53 +00:00
parent 9259cadfc5
commit 89e3c725e4
11 changed files with 366 additions and 0 deletions

11
tasks/common_scripts.yml Normal file
View file

@ -0,0 +1,11 @@
---
#
# This task installs some common scripts to /usr/local/bin
# scripts are under $files/common-scripts
#
- name: Install common scripts
action: copy src=$item dest=/usr/local/bin/
with_fileglob: $files/common-scripts/*
tags:
- config

59
tasks/fas_client.yml Normal file
View file

@ -0,0 +1,59 @@
---
#
# This task sets up fasClient on a machine.
# It installs the fas-clients package, then the /etc/fas.conf and finally a cron job update.
#
#
# fas-clients is in the infrastructure repo.
# nss_db is needed to store user/group info.
#
- name: install package needed for fas-client
action: yum state=installed name=$item
with_items:
- fas-clients
tags:
- packages
- name: install nss_db on rhel hosts only
action: yum state=installed name=nss_db
only_if: "'${ansible_distribution}' == 'RedHat'"
tags:
- packages
#
# fasClients needs a valid /etc/fas.conf.
# There's vars used in this template:
#
# fas_client_groups = "sysadmin-main"
# fas_client_restricted_app = ""
# fas_client_admin_app = ""
# fas_client_ssh_groups = ""
#
# if desired, set them on a per host/group basis.
#
# Currently the default template is used, but could be modified on a host basis.
#
- name: setup /etc/fas.conf for client use
action: template src=$item dest=/etc/fas.conf owner=root mode=600
with_first_found:
- $files/fas-client/${ansible_fqdn}.fas.conf.j2
- $files/fas-client/${ansible_hostname}.fas.conf.j2
- $files/fas-client/${ansible_hostname}.fas.conf.j2
- $files/fas-client/fas.conf.j2
tags:
- config
#
# setup /etc/cron.d/ file to run sync every 10min
# TODO: use cron module when it's fixed
#
#- name: fas_client cron job
# cron: name="fas client" user=root cron_file=fas-client minute="*/10" job="/usr/bin/fasClient -i"
# tags:
# - config
#
- name: fas_client cron job
action: copy src=$files/fas-client/fas-client.cron dest=/etc/cron.d/fas-client owner=root mode=700
tags:
- config