Coder Social home page Coder Social logo

ansible-role-f5app_services_package's Introduction

Ansible Role: Install F5 Automation Toolchain on BIG-IP

Performs a series of steps needed to download and install RPM packages on the BIG-IP that are a part of F5 automation toolchain. It can also remove the said packages from the BIG-IP system.

Requirements

  • โ€˜rpmโ€™ tool installed on the Ansible controller

Role Variables

Available variables are listed below. For their default values, see defaults/main.yml:

provider:
  server: "{{ f5app_services_package_server }}"
  server_port: "{{ f5app_services_package_server_port }}"
  user: "{{ f5app_services_package_user }}"
  password: "{{ f5app_services_package_password }}"
  validate_certs: "{{ f5app_services_package_validate_certs | default(no) }}"
  transport: "{{ f5app_services_package_transport }}"

Establishes initial connection to the specified BIG-IP to install/remove RPM packages. This should be updated just as you would when using provider with a module directly.

f5app_services_package_state: present

When set to present the requested RPM package will be downloaded and installed or installed on the BIG-IP. The absent value will remove the requested RPM package from the BIG-IP.

f5app_services_package_path

Path to the RPM package on the Ansible controller. This parameter is used when downloading a package or just installing RPM packages that are already downloaded. When removing package if the full path to the package is provided, the filename will be cherry picked to properly remove the package.

f5app_services_package_url

The full url of the requested RPM package to be downloaded for installation on the BIG-IP.

f5app_services_package_checksum_url

The full url to the SHA256 checksum file, used when checksum verification of the RPM download is required.

f5app_services_package_checksum

The RPM SHA265 checksum string, used when checksum verification of the RPM download is required. Mutually exclusive with f5app_services_package_checksum_url.

Dependencies

  • A BIG-IP TMOS version 12.0.0 and above.

  • Installed RPM tool on the Ansible controller.

Example Playbooks

The role can be used in couple of ways depending on the specified variables. The choice of method will depend on you.

  • Download and Install
  • Install
  • Remove

Download and Install

- name: Download and Install RPMs
  hosts: download
  any_errors_fatal: true

  tasks:
    - name: Download and Install AS3 RPM no sha check
      include_role:
        name: f5devcentral.f5app_services_package
      vars:
        f5app_services_package_url: "https://github.com/F5Networks/f5-appsvcs-extension/raw/master/dist/latest/f5-appsvcs-3.9.0-3.noarch.rpm"
        f5app_services_package_path: "/tmp/f5-appsvcs-3.9.0-3.noarch.rpm"

    - name: Download and Install DO RPM sha check - url
      include_role:
        name: f5devcentral.f5app_services_package
      vars:
        f5app_services_package_url: "https://github.com/F5Networks/f5-declarative-onboarding/raw/master/dist/f5-declarative-onboarding-1.3.0-4.noarch.rpm"
        f5app_services_package_checksum_url: "https://github.com/F5Networks/f5-declarative-onboarding/raw/master/dist/f5-declarative-onboarding-1.3.0-4.noarch.rpm.sha256"
        f5app_services_package_path: "/tmp/f5-declarative-onboarding-1.3.0-4.noarch.rpm"

    - name: Download and Install TS RPM sha check - no_url
      include_role:
        name: f5devcentral.f5app_services_package
      vars:
        f5app_services_package_url: "https://github.com/F5Networks/f5-telemetry-streaming/raw/master/dist/f5-telemetry-1.1.0-1.noarch.rpm"
        f5app_services_package_destination: "/tmp/f5-telemetry-1.1.0-1.noarch.rpm"
        f5app_services_package_checksum: "7fdad5ff409ca7068f75a19c38d1b06d3f4facb86afce15976af63b963c03e29"

Install

- name: Install RPMs
  hosts: install
  any_errors_fatal: true

  tasks:
    - name: Install AS3 RPM
      include_role:
        name: f5devcentral.f5app_services_package
      vars:
        f5app_services_package_path: "/tmp/f5-appsvcs-3.9.0-3.noarch.rpm"

    - name: Install DO RPM
      include_role:
        name: f5devcentral.f5app_services_package
      vars:
        f5app_services_package_path: "/tmp/f5-declarative-onboarding-1.3.0-4.noarch.rpm"

    - name: Install TS RPM
      include_role:
        name: f5devcentral.f5app_services_package
      vars:
        f5app_services_package_path: "/tmp/f5-telemetry-1.1.0-1.noarch.rpm"

Remove

- name: Remove RPMs
  hosts: remove
  any_errors_fatal: true

  tasks:
    - name: Remove AS3 RPM
      include_role:
        name: f5devcentral.f5app_services_package
      vars:
        f5app_services_package_path: "/tmp/f5-appsvcs-3.9.0-3.noarch.rpm"

    - name: Remove DO RPM
      include_role:
        name: f5devcentral.f5app_services_package
      vars:
        f5app_services_package_path: "/tmp/f5-declarative-onboarding-1.3.0-4.noarch.rpm"

    - name: Remove TS RPM
      include_role:
        name: f5devcentral.f5app_services_package
      vars:
        f5app_services_package_path: "/tmp/f5-telemetry-1.1.0-1.noarch.rpm"

License

Apache

Author Information

This role was created in 2019 by Wojciech Wypior.

ansible-role-f5app_services_package's People

Contributors

focrensh avatar wojtek0806 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-role-f5app_services_package's Issues

RPM is not installed raise error even though rpm is installed

I'm receiving an error: RPM is not installed raise error even though RPM is installed on the system.

(ansible) bash-3.2$ ansible-galaxy list
# /Users/cgreen/Documents/GitHub/test/ansible/roles
- f5devcentral.f5app_services_package, v0.9.1

(ansible) bash-3.2$ ansible --version
ansible 2.8.4
  config file = /Users/cgreen/Documents/GitHub/test/ansible/ansible.cfg
  configured module search path = ['/Users/cgreen/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/cgreen/.local/share/virtualenvs/ansible-iVCW_Tno/lib/python3.7/site-packages/ansible
  executable location = /Users/cgreen/.local/share/virtualenvs/ansible-iVCW_Tno/bin/ansible
  python version = 3.7.4 (default, Jul  9 2019, 18:13:23) [Clang 10.0.1 (clang-1001.0.46.4)]

(ansible) bash-3.2$ python --version
Python 3.7.4

(ansible) bash-3.2$ which rpm
/usr/local/bin/rpm

(ansible) bash-3.2$ rpm --version warn=False
RPM version 4.14.2.1

(ansible) bash-3.2$ ansible-playbook bigip.yml 

PLAY [Configure BIG-IP] ************************************************************************************************************************************************************************

TASK [Download and Install AS3 RPM no sha check] ***********************************************************************************************************************************************

TASK [f5devcentral.f5app_services_package : Check if RPM exists on controller] *****************************************************************************************************************
changed: [test-demo-1-f5vm_74b4 -> localhost]

TASK [f5devcentral.f5app_services_package : RPM is not installed raise error] ******************************************************************************************************************
skipping: [test-demo-1-f5vm_74b4]

TASK [f5devcentral.f5app_services_package : Set Connection Facts] ******************************************************************************************************************************
ok: [test-demo-1-f5vm_74b4]

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.