Asible: ufw is not a legal parameter in an undefined task or handler

Trying to run silent install on ubuntu 14.04

ansible-playbook -i hosts ruby-webapp.yml -t swap,ruby,deploy,mysql,nginx,ufw,import_data

      

I get

ERROR: ufw is not a legal parameter in an Ansible task or handler

and I cannot proceed with the rest of the installation.

+3


source to share


1 answer


ufw

was added as a system module to Ansible 1.6 (see http://docs.ansible.com/ufw_module.html ).

You are probably using an old version of Ansible on your node control (i.e. on the machine where you are invoking the command ansible-playbook

). Check your version with:

ansible --version

The update depends on how you originally installed Ansible, but if you installed it on your system as root with pip

, you can probably use:

sudo pip install -U ansible

( -U

means "update")



Edit: just realized that you can run Ubuntu 14.04 as your node control, so I checked which version you get when you install Ansible from apt-get

. At the time of this writing, it installs version 1.5.4, so if you've installed it, you definitely have the wrong version. You probably want to uninstall the OS package version and use one of the recommended installation methods: http://docs.ansible.com/intro_installation.html#running-from-source

Something like:

sudo apt-get remove ansible
sudo easy_install pip
sudo pip install ansible

      

If you are missing easy_install

, you can install it with:

sudo apt-get install python-setuptools

      

+4


source







All Articles