Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unarchive failure when unix group specified doesn't exist #51848

Closed
TrentonAdams opened this issue Feb 6, 2019 · 2 comments · Fixed by #51914
Closed

unarchive failure when unix group specified doesn't exist #51848

TrentonAdams opened this issue Feb 6, 2019 · 2 comments · Fixed by #51914
Labels
affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. has_pr This issue has an associated PR. m:unarchive This issue/PR relates to the unarchive module. module This issue/PR relates to a module. support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@TrentonAdams
Copy link

SUMMARY

I receive an error because the "tomcat" group that I used was not created as a unix group...

ISSUE TYPE
  • Bug Report
COMPONENT NAME

unarchive

ANSIBLE VERSION
[root@063f16044985 ansible]# ansible --version
ansible 2.7.6
  config file = /cas-overlay/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
CONFIGURATION
[root@063f16044985 ansible]# ansible-config dump --only-changed
ANSIBLE_PIPELINING(/cas-overlay/ansible/ansible.cfg) = True
ANSIBLE_SSH_ARGS(/cas-overlay/ansible/ansible.cfg) = -o ControlMaster=auto -o ControlPersist=60s
OS / ENVIRONMENT

centos 7 inside of docker.

DEPENDENCY PROBLEMS

none

STEPS TO REPRODUCE

easy, just specify a group owner in your yaml that is not yet created in the unix file system. For example, the group 'tomcat' below was not created inside of my docker image, therefore unarchive throws the obscure error I mentioned earlier.

- name: Extract cas archive to /var/lib/tomcat8/webapp/cas
  unarchive:
    src: ../target/cas-install.tar.gz
    dest: /
    group: tomcat
    extra_opts: [ "--strip-components=1" ]
  notify: restart services
  when: not ansible_check_mode
  tags: install
EXPECTED RESULTS

I would expect a better message like unix group "tomcat" does not exist

ACTUAL RESULTS
fatal: [localhost]: FAILED! => {"changed": false, "dest": "/", "gid": 0, "group": "root", "handler": "TgzArchive", "mode": "0755", "msg": "Unexpected error when accessing exploded file: [Errno 2] No such file or directory: '/var/lib/tomcat8/webapps/cas/META-INF'", "owner": "root", "size": 4096, "src": "/root/.ansible/tmp/ansible-tmp-1549494633.45-18088113372762/source", "state": "directory", "uid": 0}
@ansibot
Copy link
Contributor

ansibot commented Feb 6, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Feb 6, 2019

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. m:unarchive This issue/PR relates to the unarchive module. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Feb 6, 2019
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Feb 12, 2019
@sivel sivel added the has_pr This issue has an associated PR. label Feb 12, 2019
@ansible ansible locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. has_pr This issue has an associated PR. m:unarchive This issue/PR relates to the unarchive module. module This issue/PR relates to a module. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants