Open michael-conway opened 8 years ago
---
- name: >
RedHat | set_fact
rabbitmq_supported_os: True
set_fact:
rabbitmq_supported_os: True
- name: RedHat | Install erlang package
yum: name=erlang state=latest
- name: RedHat | Install rabbitmq signing key
rpm_key: state=present key={{ rabbitmq_signing_key_location }}
#Only RPM install is availible at this time.
- name: RedHat | Install rabbitmq rpm
yum: name={{ rabbitmq_rpm_location }} state=present
vars at https://github.com/rack-roles/rabbitmq/blob/master/defaults/main.yml
---
# ################
# Playbook control
# ################
# Packages
rabbitmq_signing_key_location: http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
rabbitmq_rpm_location: http://www.rabbitmq.com/releases/rabbitmq-server/v3.3.1/rabbitmq-server-3.3.1-1.noarch.rpm
#Owner
rabbitmq_user: rabbitmq
rabbitmq_group: rabbitmq
# Plugins
rabbitmq_plugins: []
rabbitmq_new_only: 'no'
# VHOST
rabbitmq_vhost_definitions: []
rabbitmq_users_definitions: []
#example
#rabbitmq_users_definitions:
# - user: foo
# password: bar
# vhost: '/'
# tags:
# - one
# - two
# configure_priv: '.*'
# read_priv: '.*'
# write_priv: '.*'
# force: yes
# Avoid setting up federation
rabbitmq_federation: false
# defaults file for rabbitmq
rabbitmq_cacert : "cacert.pem"
rabbitmq_server_key : "server_key.pem"
rabbitmq_server_cert: "server_cert.pem"
rabbitmq_ssl : false
# ######################
# RabbitMQ Configuration
# ######################
# rabbitmq TCP configuration
rabbitmq_conf_tcp_listeners_address: ''
rabbitmq_conf_tcp_listeners_port: 5672
# rabbitmq path
rabbitmq_conf_path: /etc/rabbitmq
# Generte self signed cert
rabbitmq_ssl_self_signed_cert: false
# rabbitmq SSL configuration
rabbitmq_conf_ssl_path: "{{ rabbitmq_conf_path }}/ssl"
rabbitmq_conf_ssl_listeners_address : '0.0.0.0'
rabbitmq_conf_ssl_listeners_port : 5671
rabbitmq_conf_ssl_options_cacertfile : "{{ rabbitmq_conf_ssl_path }}/{{ rabbitmq_cacert }}"
rabbitmq_conf_ssl_options_certfile : "{{ rabbitmq_conf_ssl_path }}/{{ rabbitmq_server_cert }}"
rabbitmq_conf_ssl_options_keyfile : "{{ rabbitmq_conf_ssl_path }}/{{ rabbitmq_server_key }}"
rabbitmq_conf_ssl_options_fail_if_no_peer_cert: "true"
code is installing key using this module http://docs.ansible.com/ansible/rpm_key_module.html
error with vvvv
K: [Rackspace_Automation.rabbitmq | RedHat | Install rabbitmq signing key] ***
<dfc-test-vmlab5.edc.renci.org> ESTABLISH CONNECTION FOR USER: ansible
<dfc-test-vmlab5.edc.renci.org> REMOTE_MODULE rpm_key state=present key=http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
<dfc-test-vmlab5.edc.renci.org> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/ansible/.ansible/cp/ansible-ssh-%h-%p-%r" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 dfc-test-vmlab5.edc.renci.org /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1452286983.6-107718971188897 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1452286983.6-107718971188897 && echo $HOME/.ansible/tmp/ansible-tmp-1452286983.6-107718971188897'
<dfc-test-vmlab5.edc.renci.org> PUT /tmp/tmpkU4pGa TO /home/ansible/.ansible/tmp/ansible-tmp-1452286983.6-107718971188897/rpm_key
<dfc-test-vmlab5.edc.renci.org> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/ansible/.ansible/cp/ansible-ssh-%h-%p-%r" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 dfc-test-vmlab5.edc.renci.org /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=zrsnnglvymwunblirxcowmueylbubydj] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-zrsnnglvymwunblirxcowmueylbubydj; LANG=C LC_CTYPE=C /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1452286983.6-107718971188897/rpm_key; rm -rf /home/ansible/.ansible/tmp/ansible-tmp-1452286983.6-107718971188897/ >/dev/null 2>&1'"'"''
failed: [dfc-test-vmlab5.edc.renci.org] => {"failed": true, "parsed": false}
BECOME-SUCCESS-zrsnnglvymwunblirxcowmueylbubydj
Traceback (most recent call last):
File "/home/ansible/.ansible/tmp/ansible-tmp-1452286983.6-107718971188897/rpm_key", line 2587, in <module>
main()
File "/home/ansible/.ansible/tmp/ansible-tmp-1452286983.6-107718971188897/rpm_key", line 199, in main
RpmKey(module)
File "/home/ansible/.ansible/tmp/ansible-tmp-1452286983.6-107718971188897/rpm_key", line 87, in __init__
keyfile = self.fetch_key(key)
File "/home/ansible/.ansible/tmp/ansible-tmp-1452286983.6-107718971188897/rpm_key", line 121, in fetch_key
key = rsp.read()
AttributeError: 'NoneType' object has no attribute 'read'
debug3: mux_client_read_packet: read header failed: Broken pipe
debug2: Received exit status from master 0
Shared connection to dfc-test-vmlab5.edc.renci.org closed.
FATAL: all hosts have already failed -- aborting
running amqp-borkers.yaml...
see https://github.com/rack-roles/rabbitmq/blob/master/tasks/RedHat.yml