diff options
| author | Kevin Fenzi <kevin@scrye.com> | 2013-08-19 20:12:26 +0000 |
|---|---|---|
| committer | Kevin Fenzi <kevin@scrye.com> | 2013-08-19 20:12:26 +0000 |
| commit | 8e2ec48cc0fa1804e46034fe1a30c783365b4d7e (patch) | |
| tree | 502cf64659635d2c44b9c5e0a8675961a0403871 /roles/fas_client/tasks | |
| parent | 16ce0041577d5b02286f1bf2675b5e42ba9f728b (diff) | |
| download | ansible-8e2ec48cc0fa1804e46034fe1a30c783365b4d7e.tar.gz ansible-8e2ec48cc0fa1804e46034fe1a30c783365b4d7e.tar.xz ansible-8e2ec48cc0fa1804e46034fe1a30c783365b4d7e.zip | |
Migrate a bunch of things to roles. Thanks to misc!
Diffstat (limited to 'roles/fas_client/tasks')
| -rw-r--r-- | roles/fas_client/tasks/main.yml | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/roles/fas_client/tasks/main.yml b/roles/fas_client/tasks/main.yml new file mode 100644 index 000000000..c2f64c7c8 --- /dev/null +++ b/roles/fas_client/tasks/main.yml @@ -0,0 +1,80 @@ +--- +# +# 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 + yum: state=installed name=$item + with_items: + - fas-clients + - cronie + tags: + - packages + +- name: hotfix - python-fedora proxyclient.py + copy: > + src=$files/hotfix/python-fedora/proxyclient.py + dest=/usr/lib/python2.6/site-packages/fedora/client/proxyclient.py + owner=root mode=644 + only_if: "'${ansible_distribution}' == 'RedHat'" + tags: + - hotfix + - packages + +- name: install nss_db on rhel hosts only + yum: state=installed name=nss_db + only_if: "'${ansible_distribution}' == 'RedHat'" + tags: + - packages + +# +# setup /etc/nsswitch.conf to use nssdb +# +- name: setup /etc/nsswitch.conf for client use + copy: src=nsswitch.conf dest=/etc/nsswitch.conf owner=root mode=644 + tags: + - config + +# +# 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 + template: src=$item dest=/etc/fas.conf owner=root mode=600 + with_first_found: + - ${ansible_fqdn}.fas.conf.j2 + - ${ansible_hostname}.fas.conf.j2 + - ${ansible_hostname}.fas.conf.j2 + - fas.conf.j2 + tags: + - config + notify: + - run fasclient + +# +# 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 + copy: src=fas-client.cron dest=/etc/cron.d/fas-client owner=root mode=644 + tags: + - config |
