Skip to content

Ansible Collection to automate Programmable Logic Controllers over Common Industrial Protocol (CIP)

License

Notifications You must be signed in to change notification settings

ansible-collections/community.cip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IN ACTIVE DEVELOPMENT community.cip Collection for Ansible

CI Codecov

Collection to manage Programmable Logic Controllers (PLC) via the Common Industrial Protocol (CIP). This utilizes the pycomm3 python library to communicate and manage devices. While this collection may provide functionality for any CIP device, it has only been tested against Allen Bradley PLCs at this time. This scope of this collection is limited to writing tags and verifying other properties of the PLC device limited to the capabilities of the pycomm3 Python library.

Development Environment

To use this while developing, run the following commands from within your local directory you pulled to this git repo to in order to symlink this git repo to the appropriate Ansible Collection path

mkdir -p ~/.ansible/collections/ansible_collections/community
ln -s $(pwd) ~/.ansible/collections/ansible_collections/community/cip

Execution Environment

Execution environments allow for a standardized and containerized environment to run Ansible in. This is used heavily in situations like Ansible Automation Platform. docs/execution-environment contains an example execution environment that can be used with the community.cip collection. For more information, refer to the ansible-builder documentation.

Code of Conduct

We follow the Ansible Code of Conduct in all our interactions within this project.

If you encounter abusive behavior, please refer to the policy violations section of the Code for information on how to raise a complaint.

Communication

Join the Ansible forum to ask questions, get help, and interact with us.

  • Get Help: get help or help others. Please add appropriate tags if you start new discussions; for example, use the edge tag.
  • Social Spaces: meet and interact with fellow enthusiasts.
  • News & Announcements: track project-wide announcements including social events.

We announce releases and important changes through Ansible's Bullhorn newsletter.

For more information about communication, refer to the Ansible Communication guide.

Contributing to this collection

The content of this collection is made by people like you, a community of individuals collaborating on making the world better through developing automation software.

We are actively accepting new contributors.

Any kind of contribution is very welcome.

You don't know how to start? Refer to our contribution guide!

We use the following guidelines:

Collection maintenance

The current maintainers are listed in the MAINTAINERS file. If you have questions or need help, feel free to mention them in the proposals.

To learn how to maintain / become a maintainer of this collection, refer to the Maintainer guidelines.

Governance

The process of decision making in this collection is based on discussing and finding consensus among participants.

Every voice is important. If you have something on your mind, create an issue or dedicated discussion and let's discuss it!

Tested with Ansible

External requirements

Python pycomm3 library

Supported connections

Included content

Using this collection

Gather CIP Facts

ansible-playbook playbooks/cip_facts.yml -i docs/example/inventory.ini

Verify CIP Identity

ansible-playbook playbooks/verify_cip_identity.yml -i docs/example/inventory.ini

Verify Tag Value

ansible-playbook playbooks/verify_valid_tag_value.yml -i docs/example/inventory.ini

Verify Firmware Version

ansible-playbook playbooks/verify_firmware_version.yml -i docs/example/inventory.ini

Ensure Tags are what we want them to be

ansible-playbook playbooks/ensure_tags.yml -i docs/example/inventory.ini

Do all above tasks

ansible-playbook playbooks/main.yml -i docs/example/inventory.ini

Installing the Collection from Ansible Galaxy

Before using this collection, you need to install it with the Ansible Galaxy command-line tool:

ansible-galaxy collection install community.cip

You can also include it in a requirements.yml file and install it with ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: community.cip

Note that if you install the collection from Ansible Galaxy, it will not be upgraded automatically when you upgrade the ansible package. To upgrade the collection to the latest available version, run the following command:

ansible-galaxy collection install community.cip --upgrade

You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax to install version 0.1.0:

ansible-galaxy collection install community.cip:==0.1.0

See Ansible Using collections for more details.

Release notes

See the changelog.

More information

Friendly Reminder

PLCs control real world objects that move, spin, and interact with humans. This collection can communicate with PLCs, thus, it can make changes that alter objects in the real world. It is highly recommended to develop and test in a controlled, safe place before atttempting to change or modify any control system running in a production capacity.

Licensing

MIT

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Ansible Collection to automate Programmable Logic Controllers over Common Industrial Protocol (CIP)

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published