# awx-operator backup : how can I remove no\_log: true  from postgres.yml

**URL:** <https://forum.ansible.com/t/awx-operator-backup-how-can-i-remove-no-log-true-from-postgres-yml/36856>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [July 15, 2022, 1:46pm UTC](https://forum.ansible.com/t/awx-operator-backup-how-can-i-remove-no-log-true-from-postgres-yml/36856 "2022-07-15T13:46:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![HG1](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@HG1](https://forum.ansible.com/u/HG1)\
**Post date:** [July 15, 2022, 1:46pm UTC](https://forum.ansible.com/t/awx-operator-backup-how-can-i-remove-no-log-true-from-postgres-yml/36856/1 "2022-07-15T13:46:53Z")

</div>

Hi,  
I am using K3s.

When I start a backup with awx-operator with :  
kubectl apply -f backup/awxbackup.yaml  
It keeps failing at the Postgres part of the ansible playbook postgres.yml  
The logging of the containers it says:  
“the output has been hidden due to the fact that ‘no\_log: true’ was specified for this result”  
When I connect to the manager container and view the ansible playbook postgres.yml

- name: Get PostgreSQL configuration  
k8s\_info:  
kind: Secret  
namespace: ‘{{ ansible\_operator\_meta.namespace }}’  
name: “{{ this\_awx[‘resources’][0][‘status’][‘postgresConfigurationSecret’] }}”  
register: pg\_config  
**no\_log: true**

How can I change it?  
crictl exec -it 225eb7d56b280 /bin/bash  
I am user ansible.  
Whereas the owner of the playbook is root.

Any help will be appreciated.

Regards Hans

---

<div class="post-metadata">

**Author:** ![Vincent\_Rubiolo](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@Vincent\_Rubiolo](https://forum.ansible.com/u/Vincent_Rubiolo)\
**Post date:** [July 18, 2022, 10:20am UTC](https://forum.ansible.com/t/awx-operator-backup-how-can-i-remove-no-log-true-from-postgres-yml/36856/2 "2022-07-18T10:20:14Z")

</div>

Hi Hans,

I am interested in this answer as well because, from what I know, there is no way to remove the no\_log part other than changing the operator playbook source and rebuilding the AWX operator container image.

Vincent

---

<div class="post-metadata">

**Author:** ![HG1](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@HG1](https://forum.ansible.com/u/HG1)\
**Post date:** [July 19, 2022, 1:12pm UTC](https://forum.ansible.com/t/awx-operator-backup-how-can-i-remove-no-log-true-from-postgres-yml/36856/3 "2022-07-19T13:12:17Z")

</div>

Hello Vincent,

I found this thread: [https://groups.google.com/g/awx-project/c/9m7vESRa-Lw?pli=1](https://groups.google.com/g/awx-project/c/9m7vESRa-Lw?pli=1)  
You can become root then in the container and end up in /opt/ansible  
But unfortunately that does not help

You can write a file in /opt/ansible but if you descend into /opt/ansible/roles the tree is somehow read only.

# k3s ctr task exec -t --exec-id abcd --user 0 bebe21f0114eee0547359512b1c7d527f2b7ec4ae0a41998d77d3b013964b0c4 bash

bash-4.4# ls  
playbooks requirements.yml roles watches.yaml  
bash-4.4# \> x  
bash-4.4# rm x  
bash-4.4# cd roles/  
bash-4.4# ls  
backup installer restore  
bash-4.4# \> x  
bash: x: No such file or directory  
bash-4.4# ls -al  
total 0  
drwxr-xr-x 5 root root 52 May 2 18:45 .  
drwxrwxr-x 1 ansible root 22 Jul 19 13:04 ..  
drwxr-xr-x 7 root root 93 May 2 18:44 backup  
drwxr-xr-x 7 root root 93 May 2 18:44 installer  
drwxr-xr-x 7 root root 93 May 2 18:44 restore  
bash-4.4# pwd  
/opt/ansible/roles

The only solution I saw is changing it from outside the container  
I needed to change postgres.yml  
Which is visable on the host as:

/var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/58/fs/opt/ansible/roles/backup/tasks/postgres.yml

I ended up editing this file.  
😮

Regards Hans

---

<div class="post-metadata">

**Author:** ![kurokobo1](https://avatars.discourse-cdn.com/v4/letter/k/f0a364/32.png) [@kurokobo1](https://forum.ansible.com/u/kurokobo1)\
**Post date:** [July 19, 2022, 3:52pm UTC](https://forum.ansible.com/t/awx-operator-backup-how-can-i-remove-no-log-true-from-postgres-yml/36856/4 "2022-07-19T15:52:52Z")

</div>

Hi,

As of Operator 0.23.0 or later, “no\_log” can be passed as a parameter for AWX, AWXBackup, and AWXRestore custom resources.  
Therefore if upgrading Operator is acceptable for you, using “no\_log” parameter for your custom resources is the most reasonable (and officially accepted) way, in my understanding.

If you want to debugging on older version on K3s anyway, as Vincent said, re-building Operator image is the one of the prefered way, but I like your approach 😃

FYI, since you seem to already have a Container ID, exploring /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/${CONTAINER\_ID}/rootfs is more direct way than exploring snapshots under /var/lib, since the directory under /run/…/rootfs is actual mount point for snapshots under /var/lib for containerd.  
For example, to force “no\_log” disabled you could do the following.

sudo find /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/${CONTAINER\_ID}/rootfs/opt/ansible/roles/backup -name “\*.yml” | sudo xargs sed -i ‘s/no\_log: true/no\_log: false/g’

Regards,

---

<div class="post-metadata">

**Author:** ![HG1](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@HG1](https://forum.ansible.com/u/HG1)\
**Post date:** [August 12, 2022, 5:57am UTC](https://forum.ansible.com/t/awx-operator-backup-how-can-i-remove-no-log-true-from-postgres-yml/36856/5 "2022-08-12T05:57:20Z")

</div>

Hi Vincent,

I discovered that adding the a verbosity to etc/ansible/ansible.cfg (located inside the operator container image) gives much more information.

Like this:

[default]  
enable\_task\_debugger = True  
verbosity = 4

Regards Hans

---

<div class="post-metadata">

**Author:** ![Vincent\_Rubiolo](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@Vincent\_Rubiolo](https://forum.ansible.com/u/Vincent_Rubiolo)\
**Post date:** [September 14, 2022, 10:39am UTC](https://forum.ansible.com/t/awx-operator-backup-how-can-i-remove-no-log-true-from-postgres-yml/36856/6 "2022-09-14T10:39:04Z")

</div>

Hi Hans,

Thanks for sharing your solution, this will be useful for me to have !

Vincent
