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

iso_create doesn't add folders #5275

Closed
1 task done
raisedfist opened this issue Sep 12, 2022 · 5 comments · Fixed by #5468
Closed
1 task done

iso_create doesn't add folders #5275

raisedfist opened this issue Sep 12, 2022 · 5 comments · Fixed by #5468
Labels
bug This issue/PR relates to a bug files module module plugins plugin (any type)

Comments

@raisedfist
Copy link

raisedfist commented Sep 12, 2022

Summary

When trying to add a folder/directory to an iso, using /path/to/folder in src_files, the module fails. From the output I can see ansible is parsing the content of the folder, but it doesn't add it to the iso.

Issue Type

Bug Report

Component Name

iso_create

Ansible Version

# RHEL VM
$ ansible --version
ansible [core 2.12.2]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/radam/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.8/site-packages/ansible
  ansible collection location = /home/radam/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.8.12 (default, Sep 16 2021, 10:46:05) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
  jinja version = 2.10.3
  libyaml = True

# Arch Linux VM
$ ansible --version
ansible [core 2.13.3]
  config file = None
  configured module search path = ['/home/radu/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/radu/.local/lib/python3.10/site-packages/ansible
  ansible collection location = /home/radu/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/radu/.local/bin/ansible
  python version = 3.10.6 (main, Aug  3 2022, 17:39:45) [GCC 12.1.1 20220730]
  jinja version = 3.1.2
  libyaml = True

Community.general Version

>>>  RHEL VM
$ ansible-galaxy collection list community.general

# /home/radam/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
community.general 4.8.0

>>> Arch Linux VM
$ ansible-galaxy collection list community.general

# /home/radu/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
community.general 5.5.0  

Configuration

Folder structure used:

files
├── a_simple_text_file.txt
└── scripts
    ├── 1.txt
    ├── 2.txt
    └── 3.txt

OS / Environment

I did tests on two VMs':
RHEL 8.6
Arch Linux

Steps to Reproduce

Using create_cd.yml playbook as below:

---
- name: Build CD
  hosts: localhost

  tasks:
    - name: Create iso
      community.general.iso_create:
        src_files:
          - "files/a_simple_text_file.txt"
          - "files/scripts"
        dest_iso: "mycd.iso"
        interchange_level: 3
        joliet: 3
        vol_ident: "test"

Running the playbook:

$ ansible-playbook create_cd.yml

Expected Results

Expected to have an iso containing a_simple_text_file.txt and the entire scripts subfolder.

Actual Results

$ ansible-playbook create_cd.yml
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Build VM] **************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] *******************************************************************************************************************************************************************************************************************
ok: [localhost]

TASK [Create iso] ************************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to add file files/scripts/1.txt to ISO file due to Could not find path"}

PLAY RECAP *******************************************************************************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0  

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

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

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug files module module plugins plugin (any type) labels Sep 12, 2022
@russoz
Copy link
Collaborator

russoz commented Oct 24, 2022

Hi @raisedfist Thanks for reporting this. We are waiting for the maintainer to pick this issue up.

Or maybe, @ZouYuhua , since you have worked on modules related to ISO files and if you have the availability, you could try and see if you can fix this issue. Just an idea - don't feel obliged.

@ZouYuhua
Copy link
Contributor

@russoz
I will try to fix it. Thanks.

@russoz
Copy link
Collaborator

russoz commented Oct 25, 2022

Thanks in advance for your effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug files module module plugins plugin (any type)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants