Giter VIP home page Giter VIP logo

lacework-agent-ansible-role's People

Contributors

alannix-lw avatar mikecook avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

lacework-agent-ansible-role's Issues

Deprecated use of `include`

Received the following warning when using the playbook.

[DEPRECATION WARNING]: "include" is deprecated, use include_tasks/import_tasks instead. This feature 
will be removed in version 2.16. Deprecation warnings can be disabled by setting 
deprecation_warnings=False in ansible.cfg.

tasks/main.yml uses include based on the message this should be changed to include_tasks.

Other details

Ansible Version

% ansible-playbook --version
ansible-playbook [core 2.13.7]
  config file = /home/nhairs/git/finder/security/ansible/sec-apps/ansible.cfg
  configured module search path = ['/home/nhairs/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/nhairs/.local/lib/python3.8/site-packages/ansible
  ansible collection location = /home/nhairs/.ansible/collections:/usr/share/ansible/collections:/home/nhairs/git/finder/security/ansible/sec-apps/collections
  executable location = /home/nhairs/.local/bin/ansible-playbook
  python version = 3.8.10 (default, Nov 14 2022, 12:59:47) [GCC 9.4.0]
  jinja version = 3.0.3
  libyaml = True

Lacework Role Version

  - src: alannix_lw.lacework_agent_ansible_role
    name: lacework
    version: v2.4.0

TASK [lacework : add the lacework key (apt)] is failing

Hi there,
The step lacework : add the lacework key (apt) is failing on my server, it is not apparent why this is failing and I do not know enough about apt-key to debug this myself.

FAILED! => {"after": ["EE0CC692", "80AFD0B6", "0C9A5DF9", "C0B21F32", "EFE21092", "991BC93C"], "before": ["EE0CC692", "80AFD0B6", "0C9A5DF9", "C0B21F32", "EFE21092", "991BC93C"], "changed": true, "fp": "18E76630", "id": "18E76630", "key_id": "18E76630", "msg": "apt-key did not return an error, but failed to add the key (check that the id is correct and *not* a subkey)", "short_id": "18E76630"}

It appears to be for this step: https://github.com/alannix-lw/lacework-agent-ansible-role/blob/main/tasks/main.yml#L13

"tojson" breaks templating

Hi,

encountering this issue:

TASK [alannix_lw.lacework_agent_ansible_role : generate config.json] ***************************************************************************************************************************************************************fatal: [server_a]: FAILED! => {"changed": false, "msg": "AnsibleError: template error while templating string: no filter named 'tojson'. String: \n{\n "tokens": {\n "AccessToken" : "{{ lacework_accessToken }}"\n }\n {%- if lacework_cmdAllow is defined or lacework_cmdDisallow is defined %},\n "cmdlinefilter" : {\n "allow" : "{{ lacework_cmdAllow | default("") }}",\n "disallow" : "{{ lacework_cmdDisallow | default("") }}"\n }\n {%- endif %}\n {%- if lacework_fimFilePath is defined or lacework_fimFileIgnore is defined %},\n "fim" : {\n {%- if lacework_fimFilePath is defined %}\n "filepath" : {{ lacework_fimFilePath | tojson }}\n {%- endif %}\n {%- if lacework_fimFilePath is defined and lacework_fimFileIgnore is defined %},{%- endif %}\n {%- if lacework_fimFileIgnore is defined %}\n "fileignore" : {{ lacework_fimFileIgnore | tojson }}\n {%- endif %}\n }\n {%- endif %}\n {%- if lacework_autoUpgrade is defined %},\n "AutoUpgrade" : "{{ lacework_autoUpgrade }}"\n {%- endif %}\n {%- if lacework_checkfreq is defined %},\n "checkfreq" : "{{ lacework_checkfreq }}"\n {%- endif %}\n {%- if lacework_cpuLimit is defined %},\n "cpulimit" : "{{ lacework_cpuLimit }}"\n {%- endif %}\n {%- if lacework_dbSize is defined %},\n "DbSize" : "{{ lacework_dbSize }}"\n {%- endif %}\n {%- if lacework_interfaceConnectionSize is defined %},\n "InterfaceConnectionSize" : "{{ lacework_interfaceConnectionSize }}"\n {%- endif %}\n {%- if lacework_memLimit is defined %},\n "memlimit" : "{{ lacework_memLimit }}"\n {%- endif %}\n {%- if lacework_perfMode is defined %},\n "perfmode" : "{{ lacework_perfMode }}"\n {%- endif %}\n {%- if lacework_proxyUrl is defined %},\n "ProxyUrl" : "{{ lacework_proxyUrl }}"\n {%- endif %}\n {%- if lacework_tags is defined %},\n "Tags": {{ lacework_tags |tojson }}\n {%- endif %}\n}\n"}

Please consider replacing "tojson" in templates folder with "to_json" which is included in Ansible.
See ansible/ansible#25381 which provides a few more details to the issue.

I used Ansible version 2.9.23.

I wonder why your role isn't referenced in the Lacework documentation. There is just an incomplete skeleton for Ansible users in the docs.

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.