kandi background
Explore Kits

foreman | an application that automates the lifecycle of servers | Infrastructure Automation library

 by   theforeman Ruby Version: Current License: GPL-3.0

 by   theforeman Ruby Version: Current License: GPL-3.0

Download this library from

kandi X-RAY | foreman Summary

foreman is a Ruby library typically used in Devops, Infrastructure Automation, Ansible, Docker applications. foreman has no bugs, it has a Strong Copyleft License and it has medium support. However foreman has 11 vulnerabilities. You can download it from GitHub.
Foreman is a free open source project that gives you the power to easily automate repetitive tasks, quickly deploy applications, and proactively manage your servers life cycle, on-premises or in the cloud. From provisioning and configuration to orchestration and monitoring, Foreman integrates with your existing infrastructure to make operations easier. Using Puppet, Ansible, Chef, Salt and Foreman's smart proxy architecture, you can easily automate repetitive tasks, quickly deploy applications, and proactively manage change, both on-premise with VMs and bare-metal or in the cloud. Foreman provides comprehensive, interaction facilities including a web frontend, CLI and RESTful API which enables you to build higher level business logic on top of a solid foundation. Foreman is a mature project, deployed in many organizations, managing from 10s to 10000s of servers. It is used in distributions such as RDO and RHOS (Red Hat OpenStack distribution) and has an extensive library of plugins.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • foreman has a medium active ecosystem.
  • It has 2156 star(s) with 934 fork(s). There are 115 watchers for this library.
  • It had no major release in the last 12 months.
  • foreman has no issues reported. There are 47 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of foreman is current.
foreman Support
Best in #Infrastructure Automation
Average in #Infrastructure Automation
foreman Support
Best in #Infrastructure Automation
Average in #Infrastructure Automation

quality kandi Quality

  • foreman has 0 bugs and 0 code smells.
foreman Quality
Best in #Infrastructure Automation
Average in #Infrastructure Automation
foreman Quality
Best in #Infrastructure Automation
Average in #Infrastructure Automation

securitySecurity

  • foreman has 11 vulnerability issues reported (1 critical, 4 high, 6 medium, 0 low).
  • foreman code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
foreman Security
Best in #Infrastructure Automation
Average in #Infrastructure Automation
foreman Security
Best in #Infrastructure Automation
Average in #Infrastructure Automation

license License

  • foreman is licensed under the GPL-3.0 License. This license is Strong Copyleft.
  • Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.
foreman License
Best in #Infrastructure Automation
Average in #Infrastructure Automation
foreman License
Best in #Infrastructure Automation
Average in #Infrastructure Automation

buildReuse

  • foreman releases are not available. You will need to build from source code and install.
  • Installation instructions are available. Examples and code snippets are not available.
  • It has 136031 lines of code, 7673 functions and 3569 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
foreman Reuse
Best in #Infrastructure Automation
Average in #Infrastructure Automation
foreman Reuse
Best in #Infrastructure Automation
Average in #Infrastructure Automation
Top functions reviewed by kandi - BETA

kandi has reviewed foreman and discovered the below as its top functions. This is intended to give you an instant insight into foreman implemented functionality, and help decide if they suit your requirements.

  • Parses all adapters for this adapter
    • Helper method for adding associations
      • Sets up the host for the given host
        • Registers custom metrics for tracing
          • Defines nested accessor methods
            • Finds a resource with default scope
              • Send notification .
                • Fetches the system manager .
                  • Fetch all information about the information for this table
                    • Gets all audit values in the audit type .

                      Get all kandi verified functions for this library.

                      Get all kandi verified functions for this library.

                      foreman Key Features

                      Automate your mixed infrastructure to make operations enjoyable

                      Discover, provision and upgrade your entire bare-metal infrastructure

                      Create and manage instances across private and public clouds

                      Group your hosts and manage them in bulk, regardless of location

                      Review historical changes for auditing or troubleshooting

                      Extend as needed via a robust plugin architecture

                      Automatically build images (on each platform) per system definition to optimize deployment

                      LDAP authentication and RBAC authorization to your infrastructure

                      and so much more

                      foreman Examples and Code Snippets

                      See all related Code Snippets

                      how to traverse through each line of a text file in ansible

                      copy iconCopydownload iconDownload
                      - name: Reproduce issue
                        hosts: localhost
                        gather_facts: no
                        tasks:
                          - name: get contents of package.txt
                            command: cat "/root/packages.txt"
                            register: _packages
                          - debug: 
                              msg: "package: {{ line.0 }}, arch: {{ line.1 }}"         
                            loop: "{{ _packages.stdout_lines }}"
                            vars:
                              line: "{{ item.split('|')|list }}"
                      
                      ok: [localhost] => (item=nginx | x86_64) => {
                          "msg": "package: nginx , arch:  x86_64 "
                      }
                      ok: [localhost] => (item=telnet| x86_64) => {
                          "msg": "package: telnet, arch:  x86_64 "
                      }
                      ok: [localhost] => (item=openssh | i386) => {
                          "msg": "package: openssh , arch:  i386 "
                      }
                      
                       - name: Filter
                         theforeman.foreman.content_view_filter:
                           :
                           :
                           architecture: "{{ line.1 }}"
                           package_name: "{{ line.0 }}"
                           inclusion: True
                         loop: "{{ _packages.stdout_lines }}"
                         vars:
                           line: "{{ item.split('|')|list }}"
                      
                      - name: Reproduce issue
                        hosts: localhost
                        gather_facts: no
                        tasks:
                          - name: get contents of package.txt
                            command: cat "/root/packages.txt"
                            register: _packages
                          - debug: 
                              msg: "package: {{ line.0 }}, arch: {{ line.1 }}"         
                            loop: "{{ _packages.stdout_lines }}"
                            vars:
                              line: "{{ item.split('|')|list }}"
                      
                      ok: [localhost] => (item=nginx | x86_64) => {
                          "msg": "package: nginx , arch:  x86_64 "
                      }
                      ok: [localhost] => (item=telnet| x86_64) => {
                          "msg": "package: telnet, arch:  x86_64 "
                      }
                      ok: [localhost] => (item=openssh | i386) => {
                          "msg": "package: openssh , arch:  i386 "
                      }
                      
                       - name: Filter
                         theforeman.foreman.content_view_filter:
                           :
                           :
                           architecture: "{{ line.1 }}"
                           package_name: "{{ line.0 }}"
                           inclusion: True
                         loop: "{{ _packages.stdout_lines }}"
                         vars:
                           line: "{{ item.split('|')|list }}"
                      
                      - name: Reproduce issue
                        hosts: localhost
                        gather_facts: no
                        tasks:
                          - name: get contents of package.txt
                            command: cat "/root/packages.txt"
                            register: _packages
                          - debug: 
                              msg: "package: {{ line.0 }}, arch: {{ line.1 }}"         
                            loop: "{{ _packages.stdout_lines }}"
                            vars:
                              line: "{{ item.split('|')|list }}"
                      
                      ok: [localhost] => (item=nginx | x86_64) => {
                          "msg": "package: nginx , arch:  x86_64 "
                      }
                      ok: [localhost] => (item=telnet| x86_64) => {
                          "msg": "package: telnet, arch:  x86_64 "
                      }
                      ok: [localhost] => (item=openssh | i386) => {
                          "msg": "package: openssh , arch:  i386 "
                      }
                      
                       - name: Filter
                         theforeman.foreman.content_view_filter:
                           :
                           :
                           architecture: "{{ line.1 }}"
                           package_name: "{{ line.0 }}"
                           inclusion: True
                         loop: "{{ _packages.stdout_lines }}"
                         vars:
                           line: "{{ item.split('|')|list }}"
                      
                      ---
                      - hosts: localhost
                        become: false
                        gather_facts: false
                      
                        tasks:
                      
                        - name: Gahter package list
                          shell:
                            cmd: cat package.txt
                          register: _packages
                      
                        - name: Show packages
                          debug:
                            msg: "Name: {{ item.split('|')[0] }}, Arch: {{ item.split('|')[1] }}"
                          loop: "{{ _packages.stdout_lines }}"
                      

                      how to read all lines from a file in ansible playbook

                      copy iconCopydownload iconDownload
                          - name: get contents of package.txt
                            command: "cat packages.txt"
                            register: _packages
                      
                           - name: RPM Filter
                             theforeman.foreman.content_view_filter:
                               username: "admin"
                               password: "admin"
                               server_url: "myhost"
                               name: "rpm filter"
                               organization: "myorg"
                               content_view: "My content view"
                               filter_type: "rpm"
                               package_name: "{{ item }}"
                               inclusion: True
                             loop: "{{ _packages.stdout_lines }}"
                      
                          - debug:
                              var: item
                            loop: "{{ query('lines', 'cat packages.txt') }}"
                      
                        item: open-ssh
                        item: nginx
                        item: grafana
                        item: vim
                      
                      shell> ansible-doc -t lookup lines
                      
                          - debug:
                              var: item
                            loop: "{{ query('lines', 'cat packages.txt') }}"
                      
                        item: open-ssh
                        item: nginx
                        item: grafana
                        item: vim
                      
                      shell> ansible-doc -t lookup lines
                      
                          - debug:
                              var: item
                            loop: "{{ query('lines', 'cat packages.txt') }}"
                      
                        item: open-ssh
                        item: nginx
                        item: grafana
                        item: vim
                      
                      shell> ansible-doc -t lookup lines
                      

                      How do I run two commands as part of a single docker-compose "command"?

                      copy iconCopydownload iconDownload
                      command: /bin/sh -c "rm -f /app/tmp/pids/*.pid && foreman start -f Procfile.hot"
                      

                      Is there a way to use a generic hostname that will work in both Docker and localhost?

                      copy iconCopydownload iconDownload
                      # config/database.yml
                      development:
                        host: <%= ENV['DATABASE_HOST'] || 'localhost' %>
                      
                      # docker-compose.yml
                      version: '3.8'
                      services:
                        db:
                          image: 'mysql:5.7'
                          et: cetera
                        web:
                          build: .
                          ports:
                            - '3000:3000'
                          depends_on:
                            - db
                          environment:
                            DATABASE_HOST: db  # <-- will be read in database.yml
                      
                      # config/database.yml
                      development:
                        host: <%= ENV['DATABASE_HOST'] || 'localhost' %>
                      
                      # docker-compose.yml
                      version: '3.8'
                      services:
                        db:
                          image: 'mysql:5.7'
                          et: cetera
                        web:
                          build: .
                          ports:
                            - '3000:3000'
                          depends_on:
                            - db
                          environment:
                            DATABASE_HOST: db  # <-- will be read in database.yml
                      

                      How to get rid of keys and values ​while leaving some keys and values ​in a multidimensional array

                      copy iconCopydownload iconDownload
                      $newArr = array();
                      $targetKeys = array("val_overtime","val_workexp","val_age","val_salary");
                      foreach($arr_result_all as $d){
                        $newAssoc = array();
                        foreach($targetKeys as $key){
                           $newAssoc[$key] = $d[$key];
                        }
                        $newArr[] = $newAssoc;
                      }
                      print_r($newArr);
                      

                      why does yarn --watch exit (send SIGTERM)

                      copy iconCopydownload iconDownload
                        mindling:
                          platform: linux/x86_64
                          build: .
                          tty: true
                          volumes:
                            - ./src:/app
                          ports:
                            - "3000:3000"
                          depends_on:
                            - db
                      
                      

                      How to use foreman between 2 repo?

                      copy iconCopydownload iconDownload
                      backend: bin/rails server -p 3000
                      frontend: npm start
                      

                      Why do &quot;hostname&quot; and &quot;hostname -f&quot; return each other's value?

                      copy iconCopydownload iconDownload
                      192.168.160.131 puppet-mst puppet-mst.eisen
                      
                      192.168.160.131 puppet-mst.eisen puppet-mst
                      
                      192.168.160.131 puppet-mst puppet-mst.eisen
                      
                      192.168.160.131 puppet-mst.eisen puppet-mst
                      

                      heroku python getting started tutorial EISDIR error

                      copy iconCopydownload iconDownload
                      $ cat .env
                      TIMES=2
                      

                      GCloud Rails application and keeping Redis password in an .env file

                      copy iconCopydownload iconDownload
                      env_variables:
                        REDIS_URL: redis://[REDIS_IP_ADDRESS]:6379
                        REDIS_PASSWORD: [PASSWORD]
                        SECRET_KEY_BASE: [SECRET_KEY]
                      
                      # initializers/sidekiq.rb
                      
                      Sidekiq.configure_server do |config|
                        Rails.env.production? ?
                          config.redis = { url: Rails.application.credentials.redis_url,
                                           password: Rails.application.credentials.redis_password
                          } :
                          config.redis = { url: 'redis://localhost:6379/1' }
                      end
                      
                      Sidekiq.configure_client do |config|
                        Rails.env.production? ?
                          config.redis = { url: Rails.application.credentials.redis_url,
                                           password: Rails.application.credentials.redis_password
                          } :
                          config.redis = { url: 'redis://localhost:6379/1' }
                      end
                      
                      env_variables:
                        REDIS_URL: redis://[REDIS_IP_ADDRESS]:6379
                        REDIS_PASSWORD: [PASSWORD]
                        SECRET_KEY_BASE: [SECRET_KEY]
                      
                      # initializers/sidekiq.rb
                      
                      Sidekiq.configure_server do |config|
                        Rails.env.production? ?
                          config.redis = { url: Rails.application.credentials.redis_url,
                                           password: Rails.application.credentials.redis_password
                          } :
                          config.redis = { url: 'redis://localhost:6379/1' }
                      end
                      
                      Sidekiq.configure_client do |config|
                        Rails.env.production? ?
                          config.redis = { url: Rails.application.credentials.redis_url,
                                           password: Rails.application.credentials.redis_password
                          } :
                          config.redis = { url: 'redis://localhost:6379/1' }
                      end
                      

                      See all related Code Snippets

                      Community Discussions

                      Trending Discussions on foreman
                      • how to traverse through each line of a text file in ansible
                      • how to read all lines from a file in ansible playbook
                      • With docker-compose, how do I keep a container running even if the &quot;command&quot; fails?
                      • How do I run two commands as part of a single docker-compose &quot;command&quot;?
                      • Is there a way to use a generic hostname that will work in both Docker and localhost?
                      • How to get rid of keys and values ​while leaving some keys and values ​in a multidimensional array
                      • why does yarn --watch exit (send SIGTERM)
                      • How to use foreman between 2 repo?
                      • Redis caused Action Cable error and the local server was automatically shut down
                      • Why do &quot;hostname&quot; and &quot;hostname -f&quot; return each other's value?
                      Trending Discussions on foreman

                      QUESTION

                      how to traverse through each line of a text file in ansible

                      Asked 2022-Mar-22 at 06:49

                      I have to traverse through package list file which contains list of packages with their architecture. How can I feed those input to my playbook file? I found a way to get the package names alone but architecture version is not coming. This is my package_list file

                      nginx | x86_64
                      telnet| x86_64
                      openssh | i386
                      

                      This is my playbook

                       - name: get contents of package.txt
                         command: cat "/root/packages.txt"
                         register: _packages
                       - name: get contents of architecture from packages.txt
                         command: cat "/root/packages.txt" | awk '{print $3}'
                         register: _arch
                      
                       - name: Filter
                         theforeman.foreman.content_view_filter:
                           username: "admin"
                           password: "mypass"
                           server_url: "myhost"
                           name: "myfilter"
                           organization: "COT"
                           content_view: "M_view"
                           filter_type: "rpm"
                           architecture: "{{ _arch }}"
                           package_name: "{{ item }}"
                           inclusion: True
                         loop: "{{ _packages.stdout_lines }}"
                         loop: "{{ _arch.stdout_lines }}"
                      

                      Any help would be appreciated

                      The required output is package name and architecture should be read from packages.txt file through ansible-playbook

                      ANSWER

                      Answered 2022-Mar-22 at 06:37

                      try this playbook:

                      - name: Reproduce issue
                        hosts: localhost
                        gather_facts: no
                        tasks:
                          - name: get contents of package.txt
                            command: cat "/root/packages.txt"
                            register: _packages
                          - debug: 
                              msg: "package: {{ line.0 }}, arch: {{ line.1 }}"         
                            loop: "{{ _packages.stdout_lines }}"
                            vars:
                              line: "{{ item.split('|')|list }}"
                      

                      result:

                      ok: [localhost] => (item=nginx | x86_64) => {
                          "msg": "package: nginx , arch:  x86_64 "
                      }
                      ok: [localhost] => (item=telnet| x86_64) => {
                          "msg": "package: telnet, arch:  x86_64 "
                      }
                      ok: [localhost] => (item=openssh | i386) => {
                          "msg": "package: openssh , arch:  i386 "
                      }
                      

                      for your case:

                       - name: Filter
                         theforeman.foreman.content_view_filter:
                           :
                           :
                           architecture: "{{ line.1 }}"
                           package_name: "{{ line.0 }}"
                           inclusion: True
                         loop: "{{ _packages.stdout_lines }}"
                         vars:
                           line: "{{ item.split('|')|list }}"
                      

                      following the version of ansible you could write too line: "{{ item | split('|') | list }}"

                      Source https://stackoverflow.com/questions/71567373

                      Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                      Vulnerabilities

                      In Foreman it was discovered that the delete compute resource operation, when executed from the Foreman API, leads to the disclosure of the plaintext password or token for the affected compute resource. A malicious user with the "delete_compute_resource" permission can use this flaw to take control over compute resources managed by foreman. Versions before 1.20.3, 1.21.1, 1.22.0 are vulnerable.
                      Foreman has improper input validation which could lead to partial Denial of Service
                      A flaw was found in foreman before 1.16.1. The issue allows users with limited permissions for powering oVirt/RHV hosts on and off to discover the username and password used to connect to the compute resource.
                      An input sanitization flaw was found in the id field in the dashboard controller of Foreman before 1.16.1. A user could use this flaw to perform an SQL injection attack on the back end database.
                      An authentication bypass flaw was found in the smart_proxy_dynflow component used by Foreman. A malicious attacker can use this flaw to remotely execute arbitrary commands on machines managed by vulnerable Foreman instances, in a highly privileged context.
                      foreman before version 1.16.0 is vulnerable to a stored XSS in organizations/locations assignment to hosts. Exploiting this requires a user to actively assign hosts to an organization that contains html in its name which is visible to the user prior to taking action.
                      Foreman since version 1.5 is vulnerable to an incorrect authorization check due to which users with user management permission who are assigned to some organization(s) can do all operations granted by these permissions on all administrator user object outside of their scope, such as editing global admin accounts including changing their passwords.
                      A flaw was found in foreman before version 1.15 in the logging of adding and registering images. An attacker with access to the foreman log file would be able to view passwords for provisioned systems in the log file, allowing them to access those systems.
                      foreman-debug before version 1.15.0 is vulnerable to a flaw in foreman-debug's logging. An attacker with access to the foreman log file would be able to view passwords, allowing them to access those systems.
                      It was found that foreman before 1.13.0 is vulnerable to a stored XSS via an organization or location name. This could allow an attacker with privileges to set the organization or location name to display arbitrary HTML including scripting code within the web interface.
                      A vulnerability was found in foreman 1.14.0. When creating an organization or location in Foreman, if the name contains HTML then the second step of the wizard (/organizations/id/step2) will render the HTML. This occurs in the alertbox on the page. The result is a stored XSS attack if an organization/location with HTML in the name is created, then a user is linked directly to this URL.
                      A flaw was found in foreman 1.5.1. The remote execution plugin runs commands on hosts over SSH from the Foreman web UI. When a job is submitted that contains HTML tags, the console output shown in the web UI does not escape the output causing any HTML or JavaScript to run in the user's browser. The output of the job is stored, making this a stored XSS vulnerability.

                      Install foreman

                      Read the quickstart section of the manual. If you know your setup has some specific needs, read the installation scenarios section.

                      Support

                      Our main documentation reference is the Foreman manual. If you find some gaps you would like to fill in the manual, please contribute in this repo.

                      DOWNLOAD this Library from

                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      Share this Page

                      share link
                      Reuse Pre-built Kits with foreman
                      Consider Popular Infrastructure Automation Libraries
                      Try Top Libraries by theforeman
                      Compare Infrastructure Automation Libraries with Highest Support
                      Compare Infrastructure Automation Libraries with Highest Quality
                      Compare Infrastructure Automation Libraries with Highest Security
                      Compare Infrastructure Automation Libraries with Permissive License
                      Compare Infrastructure Automation Libraries with Highest Reuse
                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      • © 2022 Open Weaver Inc.