Giter Site home page Giter Site logo

Comments (11)

tristanvs avatar tristanvs commented on August 20, 2024 1

smells like success!!

Thank you so much, my good sir! Thanks to you, i'm also learning a lot!

Cheers

Tristan

from ansible-linux-security-role.

Blake- avatar Blake- commented on August 20, 2024

@tristanvs Thanks for the heads up! You're right, that should have a dir created.

from ansible-linux-security-role.

tristanvs avatar tristanvs commented on August 20, 2024

No problem! However, i'm a noob with this. I did go ahead and create the folder. Now we have another issue. The maldet executable does download, and decompress. But the maldet folder ends up in another versionned subfolder.

ansible 2.3.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.9 (default, Jun 29 2016, 13:08:31) [GCC 4.9.2]

added:

  • name: Create maldet folder
    file: path=/root/downloads/maldet state=directory

modified (to reflect new changes in Ansible 2.3):

(PS: i believe that tags are not right with the new version, Ansible complains about duplicates).

So, with this, for some reason, Ansible considers that the folder already exists, and skips the task:
TASK [ansible-linux-security-role : Maldet | Unarchive copied package] *************************************************************************************************************************************************************
skipping: [node1.votresite.ca]
skipping: [clients.votresite.ca]

I managed once to do a download and decompress (i can't remember how). But then the next step failed, because maldet decompresses in a subfolder that is versioned (ex: maldetect-1.6.2) instead of the /root/downloads/maldet, so the installation step fails.

Any clue on how I could fix that? Sorry again, i'm still very new to this.

Cheers

from ansible-linux-security-role.

Blake- avatar Blake- commented on August 20, 2024

I just pushed a bunch of little changes, let me know if that fixes it for you.

from ansible-linux-security-role.

tristanvs avatar tristanvs commented on August 20, 2024

You're awesome, thank you! Gonna do a pull and test all that. Thanks again!

Cheers

from ansible-linux-security-role.

tristanvs avatar tristanvs commented on August 20, 2024

You, sir, are a gentleman and a scholar!

The maldet part works flawlessly now, but I got an issue at the Lynis download step. I'll post it here, but I can totally post it as a new issue if you want me to.

TASK [ansible-linux-security-role : Lynis | Grab the latest Lynis] *****************************************************************************************************************************************************************
fatal: [clients.votresite.ca]: FAILED! => {"changed": false, "dest": "/root/downloads", "failed": true, "gid": 0, "group": "root", "mode": "0755", "msg": "Request failed", "owner": "root", "response": "HTTP Error 404: Not Found", "size": 4096, "state": "directory", "status_code": 404, "uid": 0, "url": "https://cisofy.com/files/lynis-2.1.1.tar.gz"}
fatal: [node1.votresite.ca]: FAILED! => {"changed": false, "dest": "/root/downloads", "failed": true, "gid": 0, "group": "root", "mode": "0755", "msg": "Request failed", "owner": "root", "response": "HTTP Error 404: Not Found", "size": 4096, "state": "directory", "status_code": 404, "uid": 0, "url": "https://cisofy.com/files/lynis-2.1.1.tar.gz"}

from ansible-linux-security-role.

Blake- avatar Blake- commented on August 20, 2024

Ah, that version is way old now use:
lynis_version: lynis-2.5.3.tar.gz

from ansible-linux-security-role.

tristanvs avatar tristanvs commented on August 20, 2024

Like Homer would say, DOH! Forgot to put my vars file back, simply ;)

However, I still have a failed Lynis install:

TASK [ansible-linux-security-role : Lynis | Install Lynis] *************************************************************************************************************************************************************************
fatal: [clients.votresite.ca]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Shared connection to clients.votresite.ca closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File "/tmp/ansible_DNox_L/ansible_module_command.py", line 220, in \r\n main()\r\n File "/tmp/ansible_DNox_L/ansible_module_command.py", line 197, in main\r\n rc, out, err = module.run_command(args, executable=executable, use_unsafe_shell=shell, encoding=None)\r\n File "/tmp/ansible_DNox_L/ansible_modlib.zip/ansible/module_utils/basic.py", line 2486, in run_command\r\nOSError: [Errno 2] No such file or directory: '/root/downloads/lynis'\r\n", "msg": "MODULE FAILURE", "rc": 0}
fatal: [node1.votresite.ca]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Shared connection to node1.votresite.ca closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n

from ansible-linux-security-role.

Blake- avatar Blake- commented on August 20, 2024

Just pushed a fix, hopefully

from ansible-linux-security-role.

tristanvs avatar tristanvs commented on August 20, 2024
  • name: Lynis | Install Lynis
    command: mv /root/downloads/lynis /etc/lynis chdir=/root/downloads/lynis creates=/etc/lynis
    tags:
    - lynis
    - scanners

Is it possible the chdir which changes to that directory before doing the move, sort of conflicts?

from ansible-linux-security-role.

tristanvs avatar tristanvs commented on August 20, 2024

Fetching it and testing

from ansible-linux-security-role.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.