NOTE: As of Ansible 2.3, modules are now in the main Ansible repository.
See the repo merge guide for more information.
This repo still exists to allow bug fixes for stable-2.2
and older releases.
Ansible extra modules - these modules ship with ansible
NOTE: As of Ansible 2.3, modules are now in the main Ansible repository.
See the repo merge guide for more information.
This repo still exists to allow bug fixes for stable-2.2
and older releases.
Issue Type:
Feature Idea
Ansible Version:
ansible 1.8.2
Environment:
Centos 7
Summary:
The firewalld module follows the command structure very closely, ie: you need to call it twice to make a permanent change, and a change in the current firewall rules.
- name: Add keepalived service to internal zone (permanent)
firewalld: zone=internal service=keepalived state=enabled permanent=true
- name: Add keepalived service to internal zone (now)
firewalld: zone=internal service=keepalived state=enabled permanent=false
The module would be easier to use if one could use an 'enabled' flag:
- name: Add keepalived service to internal zone (permanent, now)
firewalld: zone=internal service=keepalived state=enabled permanent=true enabled=true
- name: Add keepalived service to internal zone (only on next restart, not now)
firewalld: zone=internal service=keepalived state=enabled permanent=false enabled=false
- name: Add keepalived service to internal zone (not permanent, now)
firewalld: zone=internal service=keepalived state=enabled permanent=false enabled=true
The final possible combination (not permanent or now) should trigger an error.
I very rarely make a change to the firewall that I don't want to have happen immediately AND on reboot.
Thank you so much for the excellent module!
Bug report
1.6.10
Arch Linux (both master and slave)
locale_gen doesn't generate locales on Arch Linux.
The locale_gen module looks for lines starting with a hash and a space, and removes the hash to enable locale generation for those lines. But Arch's locale.gen doesn't have spaces (only the hash) so no lines get uncommented. Since no locales are enabled, locale-gen does nothing.
Create a fresh Arch Linux system and install openssh/python2 on it. Add it to your Ansible hosts.
$ ansible -m locale_gen -a "name=en_US.UTF-8 state=present" --extra-vars "ansible_python_interpreter=/usr/bin/python2" <your Arch Linux target here>
$ ssh <your arch linux target here> locale -a
The Ansible ad-hoc command should succeed and indicate "changed"
The ssh command locale -a
should list all the locales on the system. en_US.UTF-8
should be on the list.
The Ansible command does succeed, but C and POSIX are the only locales listed aftewards. en_US.UTF-8
does not appear.
Note: clone of ansible/ansible#8387
1.8
Ubuntu 13.04
Docker facts module. This module returns facts pertaining to a running fleet of containers as well as images.
It would be useful to have a docker_facts module to return information about running containers as well I found an issue with the docker module that I ended up discussing with Paul Durivage. The essential problem is that there is a list of dictionaries per container that only contains the last running container when using "with_sequence" or "with_items" versus "count", hence making it impossible to utilize information for the entirety of a running fleet of docker containers outside of a task using the docker module.
An idea to deal with this short-coming would be to have a "docker_facts" module for obtaining information from the fleet of Docker containers.
N/A
Dictionary containing two primary entries for containers and images
N/A
Even though the password
param is specified as optional, the rabbitmq_user
module fails when it is not provided.
Stacktrace:
File "<stdin>", line 1595, in <module>
File "<stdin>", line 240, in main
File "<stdin>", line 165, in add
File "<stdin>", line 131, in _exec
File "<stdin>", line 1448, in run_command
File "/usr/lib/python2.7/posixpath.py", line 261, in expanduser
if not path.startswith('~'):
AttributeError: 'NoneType' object has no attribute 'startswith'
The bug is right here. I might send a PR when I get the time to fork and test.
Hello,
We heavily use the lvol/lvg modules in our setups.
We've noticed that to shrink a volume we need to pass the --force option which works.
However, after a few ansible-playbook runs we've noticed that somehow one volume had been resized (we can't prove if ansible is responsible) hence its associated mountpoint could not be accessed anymore since we should have done a resizefs prior to it: we ended up re creating the filesystem and lost some data.
We would like to prevent the loss of data by specifying to the lvol module (extend or reduce but not lvcreate) the --resizefs option like this lvreduce_options=--resizefs (and lvextend_options).
Specifying --resizefs to lvreduce acts as a safe guard to the data integrity of the volume since depending on the number of files/inodes on the device, the call to resizefs will fail if the size is smaller than the threshold below which data will get corrupted.
we've noticed that lvreduce is always called with --force which is not good guys! Please don't use --force by default, let the user specify it via lvreduce_options.
If the lvm design is done right, shrinking is just a matter of: lvreduce --resizefs -L XG
So no --force and in addition the FS is handled prior to the lvm shrinking, all good.
Of course this is less of a problem in case of lvextend but again passing --resizefs will make sure the FS will get expanded too after the lvm expansion which a lot of users tend to forget.
thanks for the good work
I'm getting the error: Device /dev/xvdb /dev/xvdc not found
when using multiple devices. It appears to be a list being treated as a string separated by spaces. The problem appears to be in this line: https://github.com/ansible/ansible-modules-extras/blob/devel/system/lvg.py#L145
Bug Report
ansible 1.8.2
configured module search path = /usr/share/ansible
SLES 11 SP3
I have some tasks that are supposed to install several packages via the zypper module. Since about Ansible 1.8 and specifically with version 1.8.2, the module appears to be broken, because it now tries to install a comma-separated list of modules and fails. It should install each package one-by-one.
- name: install openmotif-libs packages
zypper: name={{ item }} state=latest
with_items:
- openmotif-libs
- openmotif-libs-32bit
ok: [hostname] => (item=openmotif-libs) => {"changed": false, "item": "openmotif-libs", "msg": "remote module does not support check mode", "skipped": true} skipping: [hostname] => (item=openmotif-libs)
ok: [hostname] => (item=openmotif-libs-32bit) => {"changed": false, "item": "openmotif-libs-32bit", "msg": "remote module does not support check mode", "skipped": true} skipping: [hostname] => (item=openmotif-libs-32bit)
failed: [hostname] => (item=openmotif-libs,openmotif-libs-32bit) => {"failed": true, "item": "openmotif-libs,openmotif-libs-32bit"} msg: No provider of 'openmotif-libs,openmotif-libs-32bit' found.
msg: cannot create 'tank/deleteme/us/nagios1.lup1/blah': parent does not exist
zfs list
tank 1.94T 95.8T 663G none
tank/deleteme 472K 95.8T 236K none
tank/deleteme/us 236K 95.8T 236K none
I did try to lookup the Zfs class and there is no use of '-p' (i am using FreeBSD)
zfs create [-pu] [-o property=value]... filesystem
I tried changing the below
def create(self):
if self.module.check_mode:
self.changed = True
return
properties=self.properties
volsize = properties.pop('volsize', None)
volblocksize = properties.pop('volblocksize', None)
if "@" in self.name:
action = 'snapshot'
else:
action = 'create'
tried to change the above to action = 'create -p'
but is not working.
Bug Report
Broken : ansible 1.8.1 ansible-1.8.1-1.el6.noarch
Working : ansible 1.7.2 ansible-1.7.2-2.el6.noarch
CentOS release 6.6 (Final)
Slack webhook notification does not work anymore with the update of ansible 1.8.1.
Tasks says there is no problem but nothing is getting shown in slack.
- name: Send notification message via Slack all options
local_action:
module: slack
domain: xxx.slack.com
token: xxx
msg: "Branch {{ build }}, is now getting build on jenkins with these options: {{params}} optimize:{{optimize}} bootstrap:{{bootstrap}} and will stay up for {{timetolive}} days. The process can be followed here : xxx"
channel: "#ci"
link_names: 1
A post to the slack channel:
"Branch test, is now getting build on jenkins with these options: test optimize:test bootstrap:test and will stay up for test days. The process can be followed here : xxx"
Nothing is shown.
1.7.2 -vvv result (working)
TASK: [Send notification message via Slack all options] ***********************
<127.0.0.1> REMOTE_MODULE slack channel='#ci' token= domain=xxx.slack.com msg='Branch test, is now getting build on jenkins with these options: test optimize:test bootstrap:test and will stay up for test days. The process can be followed here : xxxx'
<127.0.0.1> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1418310211.18-188493459373960 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1418310211.18-188493459373960 && echo $HOME/.ansible/tmp/ansible-tmp-1418310211.18-188493459373960']
<127.0.0.1> PUT /tmp/tmplhxI3I TO /home/ansible/.ansible/tmp/ansible-tmp-1418310211.18-188493459373960/slack
<127.0.0.1> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=uhkhypxfjylljezednmskwqgaokaogyq] password: " -u root /bin/sh -c '"'"'echo SUDO-SUCCESS-uhkhypxfjylljezednmskwqgaokaogyq; LANG=C LC_CTYPE=C /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1418310211.18-188493459373960/slack; rm -rf /home/ansible/.ansible/tmp/ansible-tmp-1418310211.18-188493459373960/ >/dev/null 2>&1'"'"''
ok: [localhost -> 127.0.0.1] => {"changed": false, "msg": "OK"}
1.8.1 -vvv result (broken)
TASK: [Send notification message via Slack all options] ***********************
<127.0.0.1> REMOTE_MODULE slack channel='#ci' token= domain=xxx.slack.com msg='Branch test, is now getting build on jenkins with these options: test optimize:test bootstrap:test and will stay up for test days. The process can be followed here : xxx'
<127.0.0.1> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1418310038.98-146454958098479 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1418310038.98-146454958098479 && echo $HOME/.ansible/tmp/ansible-tmp-1418310038.98-146454958098479']
<127.0.0.1> PUT /tmp/tmpRiLiit TO /home/ansible/.ansible/tmp/ansible-tmp-1418310038.98-146454958098479/slack
<127.0.0.1> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=ciahqceudvthumdpkvppcfzugjjtmefp] password: " -u root /bin/sh -c '"'"'echo SUDO-SUCCESS-ciahqceudvthumdpkvppcfzugjjtmefp; LANG=C LC_CTYPE=C /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1418310038.98-146454958098479/slack; rm -rf /home/ansible/.ansible/tmp/ansible-tmp-1418310038.98-146454958098479/ >/dev/null 2>&1'"'"''
ok: [localhost -> 127.0.0.1] => {"changed": false, "msg": "OK"}
I'm getting the same issue as was reported here: ansible/ansible#8669
Error output I'm getting is:
failed: [test-domain.com -> 127.0.0.1] => {"failed": true}
msg: failed to send payload={"username": "toby", "text": "stage update has successfully completed", "link_names": 1, "channel": "#deploys", "icon_url": "http://www.ansible.com/favicon.ico"} to https://pixelfusion.slack.com/services/hooks/incoming-webhook?token=[obscured]: HTTP Error 404: Not Found
Or any other filesystem resizing. It's not clear from the documentation whether I need to run this as a separate step or whether ansible does it automagically.
C:\ansible-modules-core\files>py stat.py
Traceback (most recent call last):
File "stat.py", line 151, in <module>
from ansible.module_utils.basic import *
ImportError: No module named ansible.module_utils.basic
โFeature Ideaโ
1.7.2
N/A
In the current module logentries , it will only accept the path
parameter to following logs.
In logentries CLI agent, you can now add in a name
parameter to name your
$ le follow '/var/log/nginx*.log' --name="nginx_logs"
when we do
- logentries: path=/var/log/nginx*.log state=present
On logentries, it defaults the name of this tracking to "_.log" instead for the path /var/log/nginx_.log
. This makes it slightly confusing and not nice looking (harder to organize).
Propose to add a name
parameter instead so that we can do
- logentries: path=/var/log/nginx*.log state=present name=nginx_logs
N/A
Also see: #56
It seems this has come back to us.
vgcreate/extend command returns:
Unable to add physical volume '/dev/xvdb /dev/xvdc' to volume group 'vg.osddata'
while the playbook sent:
REMOTE_MODULE lvg vg=vg.osddata state=present pvs=/dev/xvdb,/dev/xvdc
I tried with this version:
https://raw.githubusercontent.com/ansible/ansible-modules-extras/devel/system/lvg.py
Thanks,
Mark
When adding a repository using zypper_repository, its public key may not automatically be stored as trusted. In case of the "zypper" command, it would ask interactively whether a certain GPG key fingerprint would be accepted by the user or not. However, when scripting this using the ansible zypper_repository module, this is not possible.
Some users use the "disable_gpg_check" option, but this disables the GPG check completely, thus opening a security vulnerability.
Thus, the user of the ansible zypper_repository module should be able to explicitly specify an acceptable GPG key (or multiple acceptable GPG keys) by verbatimly quoting the fingerprint of that key. This way, it is prevented that untrusted software is installed using ansible.
Instead of
zypper_repository: repo=http://download.opensuse.org/repositories/Application:/Geo/openSUSE_13.1/ name=/Application:/Geo/openSUSE_13.1/ state=present disable_gpg_check=yes
use
zypper_repository: repo=http://download.opensuse.org/repositories/Application:/Geo/openSUSE_13.1/ name=/Application:/Geo/openSUSE_13.1/ state=present acceptable_gpg_key_fingerprint=195E211106BC205D2A9C2222CC7F07489591C39B
Feature Idea.
ansible --version
ansible 1.8.2
configured module search path = None
I'm running Ansible on OSX 10.10.1 and I'm managing the same computer (local connection).
By default, cask symlinks the apps to ~/Applications instead of /Applications.
The brew cask command accepts a "--appdir" parameter but with homebrew_cask it is impossible to set it. So I would like to request an improvement to the module to add this parameter.
At the moment I've patched locally the source of the module by hardcoding it to /Applications like this:
cmd = [opt
for opt in (self.brew_path, 'cask', 'install', '--appdir=/Applications', self.current_cask)
if opt]
(lines 398-400 in homebrew_cask.py). It seems to work so far. But this is not the right solution, obviously.
For example, the homebrew_cask task could look like this:
- name: Install Homebrew cask apps
homebrew_cask: "name=spotify state=present appdir=/Applications"
Feature Idea
firewalld module
N/A
hi guys,
that would be nice if the firewalld module could support the "interface direct" configuration, allowing us to run this kind of rules:
firewall-cmd --permanent --direct --add-chain ipv4 filter FORWARD -i krb0 -o krb0 -j ACCEPT
Bugfix Pull Request
1.7.2
Ubuntu 14.04
mkfs.xfs uses the -f instead of -F flag to force creating a filesystem on devices that have an existing filesystem #18
filesystem: fstype=xfs dev=/dev/sdb1 force=yes
device formatted as xfs
xfs uses the -f flag to force creating a filesystem on a devices that have an existing filesystem; however, -F flag is being passed, which mkfs.xfs doesn't accept.
this playbook:
gives this error:
TASK: [install global npm packages] *******************************************
failed: [localhost] => (item=gulp) => {"failed": true, "item": "gulp", "parsed": false}
Traceback (most recent call last):
File "/Users/Morriz/.ansible/tmp/ansible-tmp-1416254319.77-187721358027197/npm", line 1828, in
main()
File "/Users/Morriz/.ansible/tmp/ansible-tmp-1416254319.77-187721358027197/npm", line 248, in main
installed, missing = npm.list()
File "/Users/Morriz/.ansible/tmp/ansible-tmp-1416254319.77-187721358027197/npm", line 167, in list
data = json.loads(self._exec(cmd, True, False))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Bug Report
1.7.2
Alternatives module generates invalid python code on Centos 5 & 6
The error seems to be more related to the version of python than the OS as I get the same Centos 6 error on Centos 5 when specifying ansible_python_interpreter
in the /etc/ansible/hosts
- yum: name=java-1.6.0-openjdk-devel state=installed
- alternatives: name=java path=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
Install java 1.6 and then configures the alternatives to point /usr/bin/java to the 1.6 version
fatal: [Centos6] => failed to parse: Traceback (most recent call last):
File "/tmp/.ansible/tmp/ansible-tmp-1412275620.84-98969527997889/alternatives", line 1486, in <module>
main()
File "/tmp/.ansible/tmp/ansible-tmp-1412275620.84-98969527997889/alternatives", line 122, in main
check_rc=True
File "/tmp/.ansible/tmp/ansible-tmp-1412275620.84-98969527997889/alternatives", line 1339, in run_command
args = [ os.path.expandvars(os.path.expanduser(x)) for x in args ]
File "/usr/lib64/python2.6/posixpath.py", line 251, in expanduser
if not path.startswith('~'):
AttributeError: 'NoneType' object has no attribute 'startswith'
failed: [Centos5] => {"failed": true, "parsed": false}
invalid output was: Traceback (most recent call last):
File "/tmp/.ansible/tmp/ansible-tmp-1412275620.83-139068779696675/alternatives", line 1486, in ?
main()
File "/tmp/.ansible/tmp/ansible-tmp-1412275620.83-139068779696675/alternatives", line 132, in main
except subprocess.CalledProcessError, cpe:
AttributeError: 'module' object has no attribute 'CalledProcessError'
FATAL: all hosts have already failed -- aborting
When using python26 on Centos5:
fatal: [Centos5] => failed to parse: Traceback (most recent call last):
File "/tmp/.ansible/tmp/ansible-tmp-1412275580.11-200946814475830/alternatives", line 1486, in <module>
main()
File "/tmp/.ansible/tmp/ansible-tmp-1412275580.11-200946814475830/alternatives", line 122, in main
check_rc=True
File "/tmp/.ansible/tmp/ansible-tmp-1412275580.11-200946814475830/alternatives", line 1339, in run_command
args = [ os.path.expandvars(os.path.expanduser(x)) for x in args ]
File "/usr/lib64/python2.6/posixpath.py", line 251, in expanduser
if not path.startswith('~'):
AttributeError: 'NoneType' object has no attribute 'startswith'
I also get the same No module named yum
as reported in this question
ansible -i inventory host -m lvg -a "vg='cinder' pvs='/dev/sda5'"
Volume group is not created as the module attempts to split on a parameter that hasn't been supplied, note that the docs specify this parameter as optional.
hugh@host:~/$ ansible -i inventory node18 -m lvg -a "vg='cinder' pvs='/dev/sda5'"
node18 | FAILED >> {
"failed": true,
"msg": "Traceback (most recent call last):\n File \"<stdin>\", line 1458, in <module>\n File \"<stdin>\", line 119, in main\nAttributeError: 'NoneType' object has no attribute 'split'\n",
"parsed": false
}
Bug Report
ansible 1.5.4
Based on code inspection, this is reproducible on the development branch as well.
Ansible Host: Ubuntu 14.04.1 LTS
Target System: SUSE 11.3 (zypper 1.6.308)
Using the following Ansible script:
zypper: name=package-name state=latest disable_gpg_check=yes
A previously-installed package will not be updated to the latest version, if the repository serving the update fails a certificate check. It is expected that the disable_gpg_check=yes
flag would bypass this, but it does not appear to work properly.
Install an out-of-date package on the target system and check its version.
Create an Ansible task:
- name: install the zypper repository
zypper_repository: name=myrepo repo=http://path_to_repo/ state=present
- name: update the component
zypper: name=package-name state=latest disable_gpg_check=yes
Create the zypper repository, populate the repository with a newer version of the package, and ensure that the repository is unsigned.
Run the playbook.
Check the version of the package that's installed on the target system.
It's expected that the component's package will be updated to the newest version, and that will be reflected in Ansible's output:
TASK: [component | install the zypper repository] *****************************
ok: [192.168.0.14]
TASK: [component | update the component] **************************************
changed: [192.168.0.14]
The component's package remains at the old version, and there is no error or other indication of this in Ansible's output:
TASK: [component | install the zypper repository] *****************************
ok: [192.168.0.14]
TASK: [component | update the component] **************************************
ok: [192.168.0.14]
In the zypper module it seems that the package_latest()
function doesn't respect disable_gpg_check=yes
like package_present()
does.
This indicates that Ansible will generate this command:
/usr/bin/zypper --non-interactive update --auto-agree-with-licenses package-name
when it should generate this command:
/usr/bin/zypper --non-interactive --no-gpg-check update --auto-agree-with-licenses package-name
If I run the commands manually, the first fails as expected with:
File 'repomd.xml' from repository 'myrepo' is unsigned, continue? [yes/no] (no): no
Retrieving repository 'myrepo' metadata [error]
Repository 'myrepo' is invalid.
The ansible zypper module is currently not able to install a "pattern".
โFeature Ideaโ
1.8.1
openSUSE 13.1
Use case on the shell, that is not covered by the zypper module:
zypper install -t pattern kde
This could be implemented by another argument like
type='package', 'pattern' which is then passed to zypper.
There are other types like 'srcpackage', 'product', 'patch' which zypper knows of.
The get_current_version and get_package_state functions needs to be adjusted to correctly treat patterns.
zypper: type=pattern name=kde state=present
installs the pattern kde
not possible
Bug Report
ansible --version
ansible 1.8
configured module search path = /usr/share/ansible
CentOS release 6.5 (Final)
Zabbix Server 2.4.2
zabbix_maintenance Invalid params., Incorrect method "user.authenticate"
ansible-playbook zabbix-test.yml -vvvv
zabbix-test.yml :
- name: Create 30 minutes maintenance window in Zabbix for the Web group
zabbix_maintenance: name="Web release"
host_groups=Web
state=present
minutes=30
server_url=http://zabbix.example.net
login_user=zabbixuser
login_password=zabbixpassword
Zabbix maintenance to be created successfully in the frontend.
TASK: [Create 30 minutes maintenance window in Zabbix for the Web group] ****
<localhost> ESTABLISH CONNECTION FOR USER: zabbixuser on PORT 22 TO localhost
<localhost> REMOTE_MODULE zabbix_maintenance name="Web release" host_groups=CERES_Prod state=present minutes=30 server_url=http://zabbix.example.net login_user=zabbixuser login_password=VALUE_HIDDEN
<localhost> EXEC /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1417009357.56-165948609075556 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1417009357.56-165948609075556 && echo $HOME/.ansible/tmp/ansible-tmp-1417009357.56-165948609075556'
<localhost> PUT /tmp/tmpBh9O6y TO /home/zabbixuser/.ansible/tmp/ansible-tmp-1417009357.56-165948609075556/zabbix_maintenance
<localhost> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=kjuyjmwmetzdqhinxvpkhxmgpqgkaroo] password: " -u root /bin/sh -c '"'"'echo SUDO-SUCCESS-kjuyjmwmetzdqhinxvpkhxmgpqgkaroo; LANG=C LC_CTYPE=C /usr/bin/python /home/zabbixuser/.ansible/tmp/ansible-tmp-1417009357.56-165948609075556/zabbix_maintenance; rm -rf /home/zabbixuser/.ansible/tmp/ansible-tmp-1417009357.56-165948609075556/ >/dev/null 2>&1'"'"''
failed: [localhost] => {"failed": true}
msg: Failed to connect to Zabbix server: (u'Error -32602: Invalid params., Incorrect method "user.authenticate". while sending {"params": {"password": "zabbixpassword", "user": "zabbixuser"}, "jsonrpc": "2.0", "method": "user.authenticate", "auth": "", "id": 0}', -32602)
FATAL: all hosts have already failed -- aborting
According to the latest Zabbix version documentation (https://www.zabbix.com/documentation/2.4/manual/api/reference/user) there doesn't seem to be any user.authenticate method supported but it should be user.login .
Getting the following error after a recent F5 upgrade to 11.6 from 11.5
failed: [localhost -> 127.0.0.1] => {"failed": true}
msg: received exception: Server raised fault: 'Exception caught in LocalLB::urn:iControl:LocalLB/VirtualServer::get_fw_rule()
Common::NotImplemented
Role is defined as the following:
tasks:
- name: Get F5 Virtual Servers
local_action: >
bigip_facts
server=esilo-f5-corp
user={{ f5_user }}
password={{ f5_passwd }}
include=virtual_server
register: bigip_vars
Ansible 1.7.2
Hi,
I was trying to add Slack notification if one of my Ansible script and the Slack configuration I have got for an Incoming Webhook does not contains any Token information.
Instead, Slack provide me with a full URL (Probably unique for my webhook) that has nothing to do with what the current Slack Module is trying to build.
It look like that:
https://hooks.slack.com/services/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
If the Slack team is really changing the way hook integrations are working, it would probably be more future proof to allow Ansible users to set the full URL instead (or on top) of the Token.
Aurรฉlien
The Hipchat module only supports API V1 at this moment. Anyone working on API V2 or interested in it?
Ideally, something like this:
$ hipchat: token=AAAAAA room=notify msg="Ansible task finished" hipchat_api="v2"
By declare hipchat_api
we can force API v2 and give backward compatible for API v1. No change needs to make to existed playbook. So it won't break anything.
Bug Report
1.8.2
Ansible on Gentoo amd64.
Creation of volume group with symlink in pvs list is not idempotent. When symlink is in pvs list should check vg members with real devices not link name.
ls -l /dev/md/raid1
lrwxrwxrwx 1 root root 8 Jan 12 18:26 /dev/md/raid1 -> ../md127
Repeat the task at least twice:
name: create raid1 vg
lvg: vg=raid1 pvs=/dev/md/raid1
tags: storage
Create at the first run, ok on the second and next runs.
TASK: [create raid1 vg] *******************************************************
failed: [s1.ifab.ru] => {"err": " Can't initialize physical volume "/dev/md/raid1" of volume group "raid1" without -ff\n", "failed": true, "rc": 5}
msg: Creating physical volume '/dev/md/raid1' failed
Bug Report/Feature Request
(WAS ansible/ansible#8990)
1.6.1, but same in master
OpenBSD
openbsd_pkg 's module doesnt allow to install a package when it has alternatives - ie for example php-fpm, which could be 5.3 or 5.4 - or python, where 2.6, 2.7 and 3.3 are available
playbook snippet:
- name: install php-fpm
openbsd_pkg: name=php-fpm-5.4 state=installed
php-fpm 5.4 should have installed
failed: [twilight.rhaalovely.net] => {"failed": true, "item": ""}
msg: Error from http://ftp.fr.openbsd.org/pub/OpenBSD/5.5/packages/amd64/php-fpm-5.4.tgz
ftp: Error retrieving file: 404 Not Found
pkg_add has this feature that if you use -z, it will try fuzzy-matching the package name/version, if you provided it enough details
Various usescases for -z ..
$ sudo pkg_add -I php-fpm-5.4*
Error from http://ftp.fr.openbsd.org/pub/OpenBSD/5.5/packages/amd64/php-fpm-5.4*.tgz
ftp: Error retrieving file: 404 Not Found
$ sudo pkg_add -Iz php-fpm
Ambiguous: php-fpm could be php-fpm-5.3.28p3 php-fpm-5.4.24
$ sudo pkg_add -Iz php-fpm-5.4*
php-fpm-5.4.24: ok
If openbsd_pkg would add -z in pkg_add invocation in https://github.com/ansible/ansible/blob/devel/library/packaging/openbsd_pkg#L127, then i would be able to install the correct version of the package within the alternatives, specifying php-fpm-5.4* in the name arg.
It looks as though the ufw module does not allow specifying both an interface and a from_ip. The following code block was producing what appears to have been a ufw-related error:
- name: Allow MySQL/Galera Traffic Over Cluster Network
ufw: rule=allow proto=tcp
from_ip="{{ mysql_galera_network }}"
interface="{{ mysql_galera_interface }}"
to_port={{ item }}
with_items:
- "4567"
- "3306"
when: mysql_use_galera == true
The resulting error is:
...
failed: [stage-mysqlcluster4.teamsnap.com] => (item=3306) => {"failed": true, "item": "3306"} msg: ERROR: Invalid token 'on'
...
Removing the interface line, however, alleviates the issue. The documentation on the module page (http://docs.ansible.com/ufw_module.html) indicates this should be allowed, although the examples do not necessarily match the options table.
Bug Report
1.7.2 (tested)
branch: devel (i looked into the code, see Possible Solution)
Centos 6.6
monitoring/monit.py won't recognize a process name if the name contains uppercase letters.
sorry, but that's all.
- name: myMonitProcess
monit: name=myMonitProcess state=unmonitored
will result in
msg: myMonitProcess process not presently configured with monit
if "monit summary" is displaying:
Process 'myMonitProcess' Running
System 'localhost' Running
I expect it to work with uppercase process names as it is working with lowercase only process names, and mixedcase process names self speaking.
Unless i use completely lowercase process names it won't work.
Sorry, i don't have a test environment, but i managed to identify a possible solution:
line 78 and line 79
parts = line.lower().split()
if len(parts) > 2 and parts[0] == 'process' and parts[1] == "'%s'" % name:
'line' should NOT be converted to lower and 'process' should then be 'Process' (uppercase P)
Issue Type:
Bug Report
Ansible Version:
ansible 1.8.2
configured module search path = /usr/share/ansible
Environment:
OS X 10.10.1 > Debian 7.7
Summary:
Hello, I try to setup my slaves using ansible, but I have an issue while setting the master state into the slave. I get a mysql exception regarding an SQL Syntax Error.
Steps To Reproduce:
- name: get master replication status
mysql_replication: mode=getmaster login_user={{ master.user }} login_password={{ master.password }}
delegate_to: "{{master.host}}"
register: replication
when: slave|failed
- name: define master status in slave
mysql_replication: mode=changemaster master_host={{ master.host }} master_log_file={{ replication.File }} master_log_pos={{ replication.Position }} master_user={{ master.user }} master_password={{ master.password }}
when: slave|failed
Expected Results:
No error
Actual Results:
TASK: [db-slave | define master status in slave] *****************************
failed: [a-future-slave] => {"failed": true, "parsed": false}
Change master
Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1418728948.93-89965021745143/mysql_replication", line 1949, in <module>
main()
File "/root/.ansible/tmp/ansible-tmp-1418728948.93-89965021745143/mysql_replication", line 367, in main
changemaster(cursor, chm, chm_params)
File "/root/.ansible/tmp/ansible-tmp-1418728948.93-89965021745143/mysql_replication", line 165, in changemaster
cursor.execute(query, chm_params)
File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''130779818'' at line 1")
From the a-future-slave logs, here is the output I get :
Dec 16 12:22:32 a-future-slave ansible-mysql_replication: Invoked with master_ssl_cert=None master_log_pos=130779818 master_ssl=False master_log_file=mysql-bin.000450 login_user=None login_host=localhost master_port=None master_host=my-master master_ssl_ca=None master_ssl_key=None login_unix_socket=None master_connect_retry=None master_user=my_user master_ssl_capath=None mode=changemaster relay_log_pos=None login_password=NOT_LOGGING_PASSWORD master_ssl_cipher=None master_password=my_password relay_log_file=None
OSX 10.7 -> Ubuntu precise
mongodb_user works incorrectly with old pymongo (~2.1).
Tested with 2.7.2, work correctly.
Creates new user
Changed = false
This code block supposed to fail on non-existant user:
try:
client[db_name].authenticate(user, password)
if state == 'present':
module.exit_json(changed=False, user=user)
except OperationFailure:
if state == 'absent':
module.exit_json(changed=False, user=user)
But it is exiting correctly and continue.
Bug Report
ansible-playbook 1.8 (devel 3bd1e4f) last updated 2014/08/28 21:51:11 (GMT -400)
boto 2.3.2.1
Running the same VPC creation tasks always results in status changed. This seems to be triggered by line 492 of ec2_vpc, but that is an indicator that something is happening that shouldn't be.
- hosts: localhost
gather_facts: no
tasks:
- name: create vpc
ec2_vpc:
state: present
cidr_block: 172.22.0.0/16
resource_tags: { "Name": "TEST" }
subnets:
- cidr: 172.22.1.0/24
resource_tags: { "Name":"TEST-1" }
az: us-east-1b
- cidr: 172.22.2.0/24
resource_tags: { "Name":"TEST-2" }
az: us-east-1c
route_tables:
- subnets:
- 172.22.1.0/24
- 172.22.2.0/24
routes:
- dest: 0.0.0.0/0
gw: igw
internet_gateway: True
region: "{{ region }}"
wait: yes
register: vpc
Creation would happen on the first time, but subsequent times changed should be = False.
first run
$: ansible-playbook -i inventory/hosts test.yml -v
PLAY [localhost] **************************************************************
TASK: [create vpc] ************************************************************
changed: [localhost] => {"changed": true, "subnets": [{"az": "us-east-1c", "cidr": "172.22.2.0/24", "id": "subnet-45f92c32", "resource_tags": {"Name": "TEST-2"}}, {"az": "us-east-1b", "cidr": "172.22.1.0/24", "id": "subnet-0b2f3823", "resource_tags": {"Name": "TEST-1"}}], "vpc": {"cidr_block": "172.22.0.0/16", "dhcp_options_id": "dopt-d2cadfb0", "id": "vpc-0c5fea69", "region": "us-east-1", "state": "available"}, "vpc_id": "vpc-0c5fea69"}
PLAY RECAP ********************************************************************
localhost : ok=1 changed=1 unreachable=0 failed=0
second run
$: ansible-playbook -i inventory/hosts test.yml -v
PLAY [localhost] **************************************************************
TASK: [create vpc] ************************************************************
changed: [localhost] => {"changed": true, "subnets": [{"az": "us-east-1c", "cidr": "172.22.2.0/24", "id": "subnet-45f92c32", "resource_tags": {"Name": "TEST-2"}}, {"az": "us-east-1b", "cidr": "172.22.1.0/24", "id": "subnet-0b2f3823", "resource_tags": {"Name": "TEST-1"}}], "vpc": {"cidr_block": "172.22.0.0/16", "dhcp_options_id": "dopt-d2cadfb0", "id": "vpc-0c5fea69", "region": "us-east-1", "state": "available"}, "vpc_id": "vpc-0c5fea69"}
PLAY RECAP ********************************************************************
localhost : ok=1 changed=1 unreachable=0 failed=0
On ansible 1.7.2
whenever I try to use composer: command=install working_dir=/path/to/project
the task fails:
TASK: [Running composer install] **********************************************
failed: [default] => {"failed": true}
msg: unsupported parameter for module: command
FATAL: all hosts have already failed -- aborting
I'm trying to install a few npm modules (appium, cordova, ios-sim, ios-deploy) using the npm module.
All of them fail although when I check the npm packages are installed succesfully. As a result, running Ansible again results in everything green. Below is one output I got for appium.
failed: [192.168.1.28] => (item={'version': '1.2.0', 'name': 'appium'}) => {"cmd": "/usr/local/bin/npm install --global [email protected]", "failed": true, "item": {"name": "appium", "version": "1.2.0"}, "rc": 1}
stderr:
stdout:
> [email protected] install /usr/local/lib/node_modules/appium/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
Could this be because Ansible is sensitive about the error output from npm or could this be npm problem? I tried extracting the run_command method from AnsibleModule and run it separately and it exit successfully.
Issue Type:
"Group managment bug in FreeBSD"
Ansible Version:
ansible 1.7.2
Python 2.7.8
Environment:
--server
FreeBSD 9.3-RELEASE FreeBSD 9.3-RELEASE #0 r268512: Thu Jul 10 23:44:39 UTC 2014 [email protected]:/usr/obj/usr/src/sys/GENERIC amd64
--target_client
FreeBSD 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 [email protected]:/usr/obj/usr/src/sys/GENERIC amd64
Summary:
I try to change groups for user "test1" in FreeBSD host.
If I am adding a new groups to user (using module "user")- all is working fine , but when I try to "delete" some group for user "test1", I see status " : ok=2 changed=1 ", but realy nothing happens. And every time I see such status.
In Linux host all i working fine.
Please fix it.
--- First time (all is fine) ---
hosts: my_servers remote_user: root tasks:
name: Create FreeBSD users user: name={{ item.name }} password={{ item.password }} groups={{ item.groups }} comment={{ item.comment }} append=no with_items: - { name: 'test1' , groups: 'mysql,cyrus', password: '11111', comment: 'Vasja' } - { name: 'test2' , groups: 'mysql', password: '22222', comment: 'Kolja' } when: ansible_os_family == "FreeBSD"
--- Second time (bug) ----
hosts: my_servers remote_user: root tasks:
name: Create FreeBSD users user: name={{ item.name }} password={{ item.password }} groups={{ item.groups }} comment={{ item.comment }} append=no with_items: - { name: 'test1' , groups: 'mysql', password: '11111', comment: 'Vasja' } - { name: 'test2' , groups: 'mysql', password: '22222', comment: 'Kolja' } when: ansible_os_family == "FreeBSD"
root@kris:/home/serg/ansible # ansible-playbook -vvvv run.yml
PLAY [my_servers] *************************************************************
GATHERING FACTS ***************************************************************
ESTABLISH CONNECTION FOR USER: root
REMOTE_MODULE setup
EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/root/.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', '172.29.251.106', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1415297453.89-59397932578099 && echo $HOME/.ansible/tmp/ansible-tmp-1415297453.89-59397932578099'"]
PUT /tmp/tmpyPFA5r TO /root/.ansible/tmp/ansible-tmp-1415297453.89-59397932578099/setup
EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/root/.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', '172.29.251.106', u"/bin/sh -c 'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/local/bin/python /root/.ansible/tmp/ansible-tmp-1415297453.89-59397932578099/setup; rm -rf /root/.ansible/tmp/ansible-tmp-1415297453.89-59397932578099/ >/dev/null 2>&1'"]
ok: [freebsd]
TASK: [Create FreeBSD users] **************************************************
ESTABLISH CONNECTION FOR USER: root
REMOTE_MODULE user name=test1 password=VALUE_HIDDEN groups=mysql comment=Vasja append=no
EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/root/.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', '172.29.251.106', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1415297454.25-201202690342400 && echo $HOME/.ansible/tmp/ansible-tmp-1415297454.25-201202690342400'"]
PUT /tmp/tmpDSK0ET TO /root/.ansible/tmp/ansible-tmp-1415297454.25-201202690342400/user
EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/root/.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', '172.29.251.106', u"/bin/sh -c 'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/local/bin/python /root/.ansible/tmp/ansible-tmp-1415297454.25-201202690342400/user; rm -rf /root/.ansible/tmp/ansible-tmp-1415297454.25-201202690342400/ >/dev/null 2>&1'"]
changed: [freebsd] => (item={'comment': 'Vasja', 'password': '11111', 'name': 'test1', 'groups': 'mysql'}) => {"append": false, "changed": true, "comment": "Vasja", "group": 1002, "groups": "mysql", "home": "/home/test1", "item": {"comment": "Vasja", "groups": "mysql", "name": "test1", "password": "11111"}, "move_home": false, "name": "test1", "password": "NOT_LOGGING_PASSWORD", "shell": "/bin/sh", "state": "present", "uid": 1002}
ESTABLISH CONNECTION FOR USER: root
REMOTE_MODULE user name=test2 password=VALUE_HIDDEN groups=mysql comment=Kolja append=no
EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/root/.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', '172.29.251.106', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1415297454.45-101295486595285 && echo $HOME/.ansible/tmp/ansible-tmp-1415297454.45-101295486595285'"]
PUT /tmp/tmpSb6Sfc TO /root/.ansible/tmp/ansible-tmp-1415297454.45-101295486595285/user
EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/root/.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', '172.29.251.106', u"/bin/sh -c 'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/local/bin/python /root/.ansible/tmp/ansible-tmp-1415297454.45-101295486595285/user; rm -rf /root/.ansible/tmp/ansible-tmp-1415297454.45-101295486595285/ >/dev/null 2>&1'"]
+ok: [freebsd] => (item={'comment': 'Kolja', 'password': '22222', 'name': 'test2', 'groups': 'mysql'}) => {"append": false, "changed": false, "comment": "Kolja", "group": 1003, "groups": "mysql", "home": "/home/test2", "item": {"comment": "Kolja", "groups": "mysql", "name": "test2", "password": "22222"}, "move_home": false, "name": "test2", "password": "NOT_LOGGING_PASSWORD", "shell": "/bin/sh", "state": "present", "uid": 1003}
+PLAY RECAP ********************************************************************
freebsd : ok=2 changed=1 unreachable=0 failed=0
Steps To Reproduce:
Just run my playbook
ansible-playbook run.yml
Expected Results:
Please enter your expected results in this space. When running the steps supplied above in the previous section, what did you expect to happen? If showing example output, please indent your output by four spaces so it will render correctly in GitHub's viewer thingy.
Change user group for user "test1" from groups=1002(test1),88(mysql),60(cyrus) to groups=1002(test1),88(mysql)
Actual Results:
Still all old groups for user "test1"
uid=1002(test1) gid=1002(test1) groups=1002(test1),88(mysql),60(cyrus)
Bug Report
ansible 1.8
OS X 10.10, Python 2.7.8 installed with homebrew.
Certificate validation for Slack fails for some reason. It shouldn't, as the certificates are valid.
Add a Slack notification to your playbook and play it:
- name: Send notification to Slack
local_action:
module: slack
domain: mediately.slack.com
token: placeholder
msg: "EC2 instance killed."
A Slack notification.
I get a certificate validation failure:
TASK: [Send notification to Slack] ********************************************
failed: [127.0.0.1 -> 127.0.0.1] => {"failed": true}
msg: Failed to validate the SSL certificate for mediately.slack.com:443. Use validate_certs=no or make sure your managed systems have a valid CA certificate installed. Paths checked for this platform: /etc/ssl/certs, /etc/ansible
FATAL: all hosts have already failed -- aborting
There are no certificates in /etc/ssl/certs
, but the code adds a dummy certificate (https://github.com/ansible/ansible/blob/e54178f904d826904e2456bd8fa711d13480c5f7/lib/ansible/module_utils/urls.py#L220-L221), which should work out of the box?
Curl, wget both verify https://mediately.slack.com
without a problem.
Bug Report
ansible 1.8.2
configured module search path = /usr/local/share/ansible
FreeBSD
at.py constructs a command line for the "at" utility with positional arguments last.
Glibc allows this, but FreeBSD libc (and others) do not. This is a security feature.
So, this needs to be written as "at -f /tmp/cmd now + 1 minute" to be portable to non-glibc systems.
--- at.py.orig 2014-12-15 11:08:47.153125860 -0500
+++ at.py 2014-12-15 11:09:11.137125129 -0500
@@ -78,7 +78,7 @@
def add_job(module, result, at_cmd, count, units, command, script_file):
- at_command = "%s now + %s %s -f %s" % (at_cmd, count, units, script_file)
+ at_command = "%s -f %s now + %s %s" % (at_cmd, script_file, count, units)
rc, out, err = module.run_command(at_command, check_rc=True)
if command:
os.unlink(script_file)
On FreeBSD, do: ansible -m at -a 'command="touch /tmp/t" count=2 units="minutes"' 127.0.0.1
There is a /tmp/t file touched two minutes from "now"
127.0.0.1 | FAILED >> {
"cmd": "/usr/bin/at now + 2 minutes -f /tmp/at47k09b",
"failed": true,
"msg": "at: garbled time",
"rc": 1,
"stderr": "at: garbled time\n",
"stdout": ""
}
When I try to install a non-existing package with something like
# ansible unstable9s -m pkgutil -a "name=CSWlibpsl-dev state=present"
The result is success and the state "present" is reported:
unstable9s | success >> {
"changed": true,
"name": "CSWlibpsl-dev",
"state": "present",
"stderr": "Package CSWlibpsl-dev not in catalog. Exiting.\n",
"stdout": "Solving needed dependencies ...\n"
}
The package was not installed on the machine and is not installed afterwards:
unstable9s% pkginfo -x CSWlibpsl-dev
ERROR: information for "CSWlibpsl-dev" was not found
Issue Type: Documentation Report
Ansible Version: 1.8.2
Environment: N/A
Summary: Add install instructions to README. Neither the documentation nor the README of this repo mention how to install the extras-modules.
Steps To Reproduce: Go to the README, modules docs, dev docs and try to find installation instructions for extras-modules.
Expected Results: The README should have an "Installation" chapter describing how to install the extras-modules (e.g. "pip install ansible-modules-extras" if there were such a pip package).
Actual Results: (see "Steps To Reproduce" above) -- nowhere installation of modules is mentioned.
If you export repository, you get clean directory structure without .svn folder. And if you try to make svn info in that folder - you get an error. So ansible should not check revision info after exporting repository
Bug Report
ansible 1.8 (devel ba46930) last updated 2014/08/06 15:37:06 (GMT -600)
CentOS 6
The alternatives module is reporting "changed" status when re-running a task that has already been successfully applied.
Given a play:
---
- hosts: all
sudo: yes
vars:
jdk_dir: /usr/java/jdk1.7.0_55
tasks:
- name: Configure Java alternatives
alternatives: name={{ item.name }} link={{ item.link }} path={{ item.path }}
with_items:
- { name: jar, link: /usr/bin/jar, path: "{{ jdk_dir }}/bin/jar" }
- { name: jps, link: /usr/bin/jps, path: "{{ jdk_dir }}/bin/jps" }
- { name: java, link: /usr/bin/java, path: "{{ jdk_dir }}/bin/java" }
- { name: jmap, link: /usr/bin/jmap, path: "{{ jdk_dir }}/bin/jmap" }
- { name: javac, link: /usr/bin/javac, path: "{{ jdk_dir }}/bin/javac" }
- { name: javaws, link: /usr/bin/javaws, path: "{{ jdk_dir }}/bin/javaws" }
- { name: jstack, link: /usr/bin/jstack, path: "{{ jdk_dir }}/bin/jstack" }
- { name: jvisualvm, link: /usr/bin/jvisualvm, path: "{{ jdk_dir }}/bin/jvisualvm" }
The first time the task is run the status is "changed" as expected. We expect subsequent runs with the identical path specified to indicate an "ok" status.
When running the task subsequently the status is actually reporting "changed".
Note: This ticket was previously reported as ansible #8613.
Feature Request
ansible 1.7.1
N/A
The get_xml method in the virt module has the flags parameter hardcoded to 0, which prevents passing in a custom flags setting to for example also retrieve the VNC password used.
Running the following does not show the password of the domain in the XML:
ansible -sK -m virt -a "command=get_xml name=[VM name]"
The domain XML including the VNC password when flasg is set to 1.
Retrieving the password of a virtual domain is currently not possible, would be nice to be able to call:
ansible -sK -m virt -a "command=get_xml name=[VM name] xml_secure=yes"
Adding extra parameters causes the module to fail due to an unrecognised parameter
Bug Report
npm
ansible 1.7.1
OSX 10.10
Attempting to install the latest npm with the npm module doesn't seem to work.
Put the following in a playbook where node is installed
- name: make sure the latest npm is installed
npm: name=npm global=true
...or try running the following:
tkellen/ansible-vagrant-example@903ee91
Latest version of npm is installed.
NPM version is unchanged.
Feature Idea
1.7.2
Ubuntu, but this goes for any environment.
It would be great if it was possible to specify mirror_only=yes
in the cpanm module. This enable installs from minicpan in a local environment where extra packages has been injected.
Example:
cpanm --mirror-only --mirror http://cpan.myinternal.net My::Custom::Module
Without "--mirror-only", cpanm will try to lookup My::Custom::Module in CPAN Meta DB.
Bug Report
Both stable and devel:
ansible 1.8.2
configured module search path = None
ansible 1.9 (devel fe53d86) last updated 2015/01/06 08:46:10 (GMT +200)
lib/ansible/modules/core: (detached HEAD 0d551d8) last updated 2015/01/06 08:50:12 (GMT +200)
lib/ansible/modules/extras: (detached HEAD d4f5b6d) last updated 2015/01/06 08:50:12 (GMT +200)
v2/ansible/modules/core: (detached HEAD cb69744) last updated 2014/12/16 07:51:34 (GMT +200)
v2/ansible/modules/extras: (detached HEAD 8a4f07e) last updated 2014/12/16 07:51:45 (GMT +200)
configured module search path = None
Running from Debian Testing.
Managing RHEL 6.6.
Getent module fails looking up a nonexistent database entry when using fail_key=False parameter, while the expected behaviour is to succeed.
Use getent to retrieve a nonexistent key in a database:
- name: getent test
getent: database=passwd key=nonexistent fail_key=False
- debug: var=getent_passwd
TASK: [getent test] ************************
ok: [<<REDACTED>>]
TASK: [debug var=getent_passwd] **********************************
ok: [<<REDACTED>>] => {
"getent_passwd": {
"nonexistent": null
}
}
TASK: [getent test] ************************
failed: [<<REDACTED>>] => {"failed": true}
msg: One or more supplied key could not be found in the database.
FATAL: all hosts have already failed -- aborting
The argument_spec entry for fail_key is missing "type='bool'":
diff --git a/system/getent.py b/system/getent.py
index 7da1be4..bb6d162 100644
--- a/system/getent.py
+++ b/system/getent.py
@@ -86,7 +86,7 @@ def main():
database = dict(required=True),
key = dict(required=False, default=None),
split = dict(required=False, default=None),
- fail_key = dict(required=False, default=True),
+ fail_key = dict(required=False, type='bool', default=True),
),
supports_check_mode = True,
)
Bug Report
ansible 1.8.2
Ubuntu 14.10 (package installed using official PPA)
The Bower and DNF modules are not included in the official PPA package.
dpkg -L ansible | grep 'bower\|dnf'
/usr/share/pyshared/ansible/modules/extras/packaging/bower.py
/usr/share/pyshared/ansible/modules/extras/packaging/dnf.py
Nothing - modules are not included in the distribution.
firewalld will only have the latest rule applied to the settings.
If you run this Task:
You get this result with misses ports.
[root@localhost ~]# firewall-cmd --list-all
public (default)
interfaces:
sources:
services: dhcpv6-client ssh
ports: 443/tcp 80/tcp
masquerade: no
forward-ports:
icmp-blocks:
rich rules:
This is wrong, but as a workaround you can call firewalld from Shell and it works well.
as result, the *.py files don't installed and those plugins can't be detected.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.