I am trying to install FreeRADIUS from the networkradius repo in my
playbook and I seem to be running into a few issues. I don't understand
why i'm getting the error on the handler trigger 2. Also the yum_repos
role doesn't seem to be installing the repo on the server i'm running the
playbook against.
First here is the command i'm running and the output i'm getting:
[andrew.meyer@jump01 playbooks]$ ansible-playbook deploy_freeradius.yml -e
'target_servers=radius01.loc.domain.local'
PLAY [radius01.loc.domain.local]
************************************************************************************************************************************************************************************************
TASK [Gathering Facts]
*********************************************************************************************************************************************************************************************************
ok: [radius01.loc.domain.local]
TASK [freeradius : Yum install FreeRADIUS]
*************************************************************************************************************************************************************************************
ok: [radius01.loc.domain.local] => (item=freeradius-config.x86_64)
ok: [radius01.loc.domain.local] => (item=freeradius-debuginfo.x86_64)
ok: [radius01.loc.domain.local] => (item=freeradius-devel.x86_64)
ok: [radius01.loc.domain.local] => (item=freeradius-freetds.x86_64)
ok: [radius01.loc.domain.local] => (item=freeradius-krb5.x86_64)
ok: [radius01.loc.domain.local] => (item=freeradius-ldap.x86_64)
ok: [radius01.loc.domain.local] => (item=freeradius-mysql.x86_64)
ok: [radius01.loc.domain.local] => (item=freeradius-perl.x86_64)
ok: [radius01.loc.domain.local] => (item=freeradius-postgresql.x86_64)
ok: [radius01.loc.domain.local] => (item=freeradius-python.x86_64)
ok: [radius01.loc.domain.local] => (item=freeradius-rest.x86_64)
ok: [radius01.loc.domain.local] => (item=freeradius-sqlite.x86_64)
ok: [radius01.loc.domain.local] => (item=freeradius-unixODBC.x86_64)
ok: [radius01.loc.domain.local] => (item=freeradius-utils.x86_64)
ok: [radius01.loc.domain.local] => (item=freeradius.x86_64)
TASK [freeradius : Systemd - Enable & Start freeradius]
************************************************************************************************************************************************************************
ok: [radius01.loc.domain.local] => (item=freeradius)
TASK [Trigger handlers]
********************************************************************************************************************************************************************************************************
changed: [radius01.loc.domain.local]
TASK [Trigger handlers 2]
******************************************************************************************************************************************************************************************************
ERROR! The requested handler 'systemd' was not found in either the main
handlers list nor in the listening handlers list
[andrew.meyer@jump01 playbooks]$
Next is the playbook I have created:
---
#- name: "Yum install FreeRADIUS1"
# yum:
# name: ['freeradius']
# state: latest
# enablerepo: " {{ freeradius_enablerepo| default(omit, true) }}"
# become: yes
# become_user: root
# with_items:
# - 'freeradius'
- name: "Yum install FreeRADIUS"
yum:
name: freeradius
state: latest
enablerepo: "{{ freeradius_enablerepo | default(omit, true) }}"
# yum:
# name: ltbproject
# enablerepo: "{{ ltbproject_enablerepo | default(omit, true) }}"
# state: latest
become: yes
become_user: root
with_items:
- 'freeradius-config.x86_64'
- 'freeradius-debuginfo.x86_64'
- 'freeradius-devel.x86_64'
- 'freeradius-freetds.x86_64'
- 'freeradius-krb5.x86_64'
- 'freeradius-ldap.x86_64'
- 'freeradius-mysql.x86_64'
- 'freeradius-perl.x86_64'
- 'freeradius-postgresql.x86_64'
- 'freeradius-python.x86_64'
- 'freeradius-rest.x86_64'
- 'freeradius-sqlite.x86_64'
- 'freeradius-unixODBC.x86_64'
- 'freeradius-utils.x86_64'
- 'freeradius.x86_64'
- name: Systemd - Enable & Start freeradius
systemd:
name: radiusd.service
daemon_reload: yes
enabled: True
state: "{{ queue_state | default('started') }}"
notify:
- 'restart radiusd server'
become: yes
become_user: root
tags:
- radiusd
# - systemd
with_items:
- freeradius
# tasks file for freeradius
Handlers:
---
- name: restart radiusd server
service:
name: radiusd
state: restarted
deamon_reload: yes
enabled: yes
#- name: reload radiusd service
# systemd:
# name: radiusd
# state: reloaded
# enabled: yes
# handlers file for freeradius
roles/playbooks/yum_repos/tasks/main.yml
- name: Add Network Radius repo
yum_repository:
name: networkradius
description: NetworkRADIUS
baseurl:
http://packages.networkradius.com/releases/centos/$releasever/repo/
gpgcheck: no
repo_gpgcheck: no
metadata_expire: 300
gpgkey: https://ltb-project.org/lib/RPM-GPG-KEY-LTB-project
sslverify: no
sslcacert: /etc/pki/tls/certs/ca-bundle.crt
enabled: no
notify: disable_repos
become: yes
become_user: root
tags:
- yum
- freeradius
- name: Add ltb-project repo
yum_repository:
name: ltbproject
description: ltbproject
baseurl: https://ltb-project.org/rpm/$releasever/$basearch
gpgcheck: yes
repo_gpgcheck: yes
metadata_expire: 300
gpgkey: https://ltb-project.org/lib/RPM-GPG-KEY-LTB-project
sslverify: no
sslcacert: /etc/pki/tls/certs/ca-bundle.crt
enabled: no
notify: disable_repos
become: yes
become_user: root
tags:
- yum
- freeradius
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/51513755-1f4a-415a-9c90-8bc29289c2b9%40googlegroups.com.