AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
13.9k
stars
3.4k
forks
source link
cannot save a file after executing playbook using tower templates #14267
[X] I understand that AWX is open source software provided for free and that I might not receive a timely response.
[X] I am NOT reporting a (potential) security vulnerability. (These should be emailed to security@ansible.com instead.)
Bug Summary
Hi team,
I have been trying to save some files as a part of ansible playbook that I am executing using templates on tower. Template executes successfully but I cannot locate the files in the respective location. What can be wrong here?
AWX version
22.2.0
Select the relevant components
[X] UI
[X] UI (tech preview)
[ ] API
[ ] Docs
[ ] Collection
[ ] CLI
[X] Other
Installation method
kubernetes
Modifications
no
Ansible version
No response
Operating system
No response
Web browser
Chrome
Steps to reproduce
create a playbook that is used to save config files
create template on awx tower that uses above playbook
launch the template, it should execute successfully.
Expected results
tower successfully saves file inside task container in the provided path (var/lib/awx/projects in my case) in the ansible playbook.
Actual results
cannot save the file and locate it
Additional information
---
- name: Backup Cisco Router or Switch
hosts: switches
gather_facts: no
connection: local
vars:
ansible_network_os: ios
ansible_connection: network_cli
ansible_become: yes
ansible_become_method: enable
dir_name: var/lib/awx/projects/{new_folder}
tasks:
- name: IOS CONFIG
ios_command:
commands: show run
register: output_router
- name: Create a directory if it does not exist
ansible.builtin.file:
path: "{{dir_name}}"
state: directory
mode: '0755'
- name: SAVE IOS CONFIG
copy:
content: "{{ output_router.stdout[0] }}"
dest: "{{dir_name}}/show_run_{{ inventory_hostname }}.txt"
Hello, this appears to be less of a bug report or feature request and more of a question. Could you please ask this on our mailing list? https://groups.google.com/u/1/g/awx-project
Hi @fosterseth thanks for your reply. However I have tried it before and havent received any response. So I post it in here and above mailing list to get some visibility at both locations. Thanks.
Please confirm the following
security@ansible.com
instead.)Bug Summary
Hi team,
I have been trying to save some files as a part of ansible playbook that I am executing using templates on tower. Template executes successfully but I cannot locate the files in the respective location. What can be wrong here?
AWX version
22.2.0
Select the relevant components
Installation method
kubernetes
Modifications
no
Ansible version
No response
Operating system
No response
Web browser
Chrome
Steps to reproduce
Expected results
tower successfully saves file inside task container in the provided path (var/lib/awx/projects in my case) in the ansible playbook.
Actual results
cannot save the file and locate it
Additional information