-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
[BUG] Get DSA Key : You need to install \"jmespath\" prior to running json_query filter #595
Comments
That should be installed at https://github.com/konstruktoid/ansible-role-hardening/blob/master/tests/debug_facts.yml#L2. |
PLAY RECAP *********************************************************************
bullseye_vlan : ok=243 changed=131 unreachable=0 failed=0 skipped=139 rescued=0 ignored=0
Friday 05 April 2024 11:36:48 +0000 (0:00:00.098) 0:03:52.041 **********
================================================
konstruktoid.hardening : Debian family package installation ------------ 36.89s
konstruktoid.hardening : Block blacklisted kernel modules -------------- 10.43s
konstruktoid.hardening : Enforce AppArmor profiles ---------------------- 9.06s
konstruktoid.hardening : Install rkhunter ------------------------------- 8.95s
konstruktoid.hardening : Add local usernames to password list ----------- 7.19s
konstruktoid.hardening : Run rkhunter propupd --------------------------- 6.72s
konstruktoid.hardening : Install rng-tools ------------------------------ 4.47s
konstruktoid.hardening : Install systemd timesyncd ---------------------- 4.19s
konstruktoid.hardening : Allow outgoing specified ports ----------------- 4.17s
konstruktoid.hardening : Update rkhunter databases ---------------------- 3.94s
konstruktoid.hardening : Set default deny ------------------------------- 3.93s
konstruktoid.hardening : Install python3-pexpect ------------------------ 3.76s
konstruktoid.hardening : Debian family UFW installation ----------------- 3.63s
konstruktoid.hardening : Blacklist misc kernel modules ------------------ 3.40s
konstruktoid.hardening : Install python3-passlib ------------------------ 2.79s
Install jmespath -------------------------------------------------------- 2.71s
konstruktoid.hardening : Configure apt ---------------------------------- 2.68s
konstruktoid.hardening : Ensure restrict compilers access via dpkg-statoverride --- 2.58s
konstruktoid.hardening : Restrict compilers access ---------------------- 2.55s
konstruktoid.hardening : Restart Postfix -------------------------------- 2.27s
Playbook run took 0 days, 0 hours, 3 minutes, 52 seconds |
I tried with
|
Do you perhaps have https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-pipelining setup somewhere in one of your |
Inverting konstruktoid.hardening and debug_facts does not work at all.
Then I do not understand why it runs on your machine and not on mine Edit:
I can run more tests on Monday, have a nice weekend! |
@konstruktoid I saw you have made commits over the weekend so I updated to the latest version but I still get
What I did:
I am still unsure how |
~$ cat ~/.ansible.cfg
[defaults]
callbacks_enabled = ansible.posix.profile_tasks,ansible.posix.timer
remote_tmp = /var/tmp/${USER}/ansible
[galaxy]
url = https://galaxy.ansible.com/ ~$ ansible-galaxy install -r requirements.yml --force
[...]
~$ vagrant destroy -f
==> almalinux: VM not created. Moving on...
==> jammy: VM not created. Moving on...
==> focal: VM not created. Moving on...
==> bullseye: VM not created. Moving on...
==> bullseye_vlan: VM not created. Moving on...
~$ vagrant up bullseye_vlan
[...]
TASK [Install jmespath] ********************************************************
Monday 08 April 2024 08:09:56 +0000 (0:00:01.007) 0:03:47.191 **********
changed: [bullseye_vlan] => {"changed": true, "cmd": ["/usr/bin/python3", "-m", "pip.__main__", "install", "jmespath"], "name": ["jmespath"], "requirements": null, "state": "present", "stderr": "", "stderr_lines": [], "stdout": "Collecting jmespath\n Downloading jmespath-1.0.1-py3-none-any.whl (20 kB)\nInstalling collected packages: jmespath\nSuccessfully installed jmespath-1.0.1\n", "stdout_lines": ["Collecting jmespath", " Downloading jmespath-1.0.1-py3-none-any.whl (20 kB)", "Installing collected packages: jmespath", "Successfully installed jmespath-1.0.1"], "version": null, "virtualenv": null}
[...]
PLAY RECAP *********************************************************************
bullseye_vlan : ok=243 changed=131 unreachable=0 failed=0 skipped=139 rescued=0 ignored=0
Monday 08 April 2024 08:10:00 +0000 (0:00:00.097) 0:03:50.625 **********
==================================================
konstruktoid.hardening : Debian family package installation ------------ 36.31s
konstruktoid.hardening : Block blacklisted kernel modules -------------- 10.87s
konstruktoid.hardening : Enforce AppArmor profiles ---------------------- 9.19s
konstruktoid.hardening : Install rkhunter ------------------------------- 8.97s
konstruktoid.hardening : Add local usernames to password list ----------- 7.23s
konstruktoid.hardening : Run rkhunter propupd --------------------------- 6.70s
konstruktoid.hardening : Set default deny ------------------------------- 4.86s
konstruktoid.hardening : Install rng-tools ------------------------------ 4.61s
konstruktoid.hardening : Allow outgoing specified ports ----------------- 4.36s
konstruktoid.hardening : Install systemd timesyncd ---------------------- 4.15s |
Sorry, I went through the log output a little better and, indeed, the install step runs. Now I understand how it works but very strangely it gives this:
and then later, this:
I will try with the same ansible.cfg but that should not make a difference. jmespath is not available in apt so I will keep testing other things. |
Just to verify, you do have |
Updated the testing document, https://github.com/konstruktoid/ansible-role-hardening/blob/master/TESTING.md |
I did not have it installed. Sorry about that. Of course in this case it is the hosts' instance that it calls... Going back to the TESTING.md.
On my side, I installed the latest master via ansible-galaxy. |
https://github.com/konstruktoid/ansible-role-hardening?tab=readme-ov-file#requirements And I've also update the test document, #601 |
Thank you! Got everything running except a timeout in priviledge escalation for Jammy but I will try to run it again and if it reoccurs, I will attempt a merge request when I find the issue. |
Hello!
Describe the bug
Running
vagrant up
results inTo Reproduce
Run
vagrant up
(Virtualbox, OSX)Expected behavior
I expect this to run without errors.
System (lsb_release -a or similar):
Virtualbox, OSX
ansible-core 2.15.8
ansible-lint 6.22.2
Additional context
In fact, I was going to open a PR but my fix did not help.
I tried to add
jmespath
at the end of these lines in the Vagrant file.ansible-role-hardening/Vagrantfile
Line 17 in e9b6226
like so:
The interesting part is that it installs:
The text was updated successfully, but these errors were encountered: