Set a var to manage the state of the deployment by this role
This commit is contained in:
		
							parent
							
								
									659dd36f2b
								
							
						
					
					
						commit
						394b2ecdb5
					
				|  | @ -6,6 +6,9 @@ | ||||||
| * Manage services for the lists var (flexlm__licences). | * Manage services for the lists var (flexlm__licences). | ||||||
| * Allow to manage several licences on a same host (close #1). | * Allow to manage several licences on a same host (close #1). | ||||||
| 
 | 
 | ||||||
|  | ### Enhancements | ||||||
|  | * Set a var to manage the state of the deployment by this role. | ||||||
|  | 
 | ||||||
| ## v1.0 | ## v1.0 | ||||||
| 
 | 
 | ||||||
| ### Features | ### Features | ||||||
|  |  | ||||||
|  | @ -15,9 +15,8 @@ A role to manage Flexlm daemon. | ||||||
| 
 | 
 | ||||||
| ## Role Variables | ## Role Variables | ||||||
| 
 | 
 | ||||||
| * **flexlm__packages_state** : State of package(s) [default : `present`]. | * **flexlm__required_packages** : List of required packages requested as 'flexlm' dependencies [default : `lsb-core`] | ||||||
| * **flexlm__packages_manage** : If package(s) should be managed with this role [default : `True`]. | * **flexlm__deploy_state** : The desired state this role should achieve. [default : `present`]. | ||||||
| * **flexlm__dependent_packages** : List of additional packages requested as 'flexlm' dependencies [default : `lsb-core`, `unzip`] |  | ||||||
| * **flexlm__lmgrd_version** : Version of `lmgrd` to use [default : `11.14.0.1`]. | * **flexlm__lmgrd_version** : Version of `lmgrd` to use [default : `11.14.0.1`]. | ||||||
| * **flexlm__lmgrd_source** : Source of the `lmgrd` bin to send [default : `usr/local/bin/lmgrd`]. | * **flexlm__lmgrd_source** : Source of the `lmgrd` bin to send [default : `usr/local/bin/lmgrd`]. | ||||||
| * **flexlm__lmgrd_path** : The place to store `lmgrd` bin [default : `/usr/local/bin/lmgrd`]. | * **flexlm__lmgrd_path** : The place to store `lmgrd` bin [default : `/usr/local/bin/lmgrd`]. | ||||||
|  |  | ||||||
|  | @ -1,10 +1,31 @@ | ||||||
| --- | --- | ||||||
| # defaults file for flexlm | # .. vim: foldmarker=[[[,]]]:foldmethod=marker | ||||||
| 
 | 
 | ||||||
| # packages | # ipr-cnrs.flexlm default variables [[[ | ||||||
| flexlm__packages_state: 'present' | # ====================================== | ||||||
| flexlm__packages_manage: True | 
 | ||||||
| flexlm__dependent_packages: [ 'lsb-core', 'unzip' ] | # Packages and installation [[[ | ||||||
|  | # ----------------------------- | ||||||
|  | 
 | ||||||
|  | # .. envvar:: flexlm__base_packages [[[ | ||||||
|  | # | ||||||
|  | # List of base packages to install. | ||||||
|  | flexlm__required_packages: | ||||||
|  |   - 'lsb-core' | ||||||
|  |                                                                    # ]]] | ||||||
|  | # .. envvar:: flexlm__deploy_state [[[ | ||||||
|  | # | ||||||
|  | # What is the desired state which this role should achieve? Possible options: | ||||||
|  | # | ||||||
|  | # ``present`` | ||||||
|  | #   Default. Ensure that flexlm is installed and configured as requested. | ||||||
|  | # | ||||||
|  | # ``absent`` | ||||||
|  | #   Ensure that flexlm is uninstalled and it's configuration is removed. | ||||||
|  | # | ||||||
|  | flexlm__deploy_state: 'present' | ||||||
|  |                                                                    # ]]] | ||||||
|  |                                                                    # ]]] | ||||||
| 
 | 
 | ||||||
| # bin | # bin | ||||||
| flexlm__lmgrd_version: '11.14.0.1' | flexlm__lmgrd_version: '11.14.0.1' | ||||||
|  | @ -33,3 +54,4 @@ flexlm__service_manage: True | ||||||
| flexlm__service_enabled: True | flexlm__service_enabled: True | ||||||
| flexlm__service_unit_content: 'etc/systemd/system/flexlm.service.j2' | flexlm__service_unit_content: 'etc/systemd/system/flexlm.service.j2' | ||||||
| 
 | 
 | ||||||
|  |                                                                    # ]]] | ||||||
|  |  | ||||||
|  | @ -1,17 +1,16 @@ | ||||||
| --- | --- | ||||||
|  | # .. vim: foldmarker=[[[,]]]:foldmethod=marker | ||||||
|  | # | ||||||
| # tasks file for flexlm | # tasks file for flexlm | ||||||
| 
 | 
 | ||||||
| # package {{{ | # Manage required system packages [[[1 | ||||||
| - name: INSTALL FlexLM packages | - name: Ensure required packages are in there desired state | ||||||
|   package: |   package: | ||||||
|     name: '{{ item }}' |     name: '{{ item }}' | ||||||
|     state: '{{ flexlm__packages_state }}' |     state: '{{ "present" if (flexlm__deploy_state == "present") else "absent" }}' | ||||||
|     install_recommends: False |     install_recommends: False | ||||||
|   with_flattened: |   with_flattened: | ||||||
|     - '{{ flexlm__dependent_packages }}' |     - '{{ flexlm__required_packages }}' | ||||||
|   when: flexlm__packages_manage |  | ||||||
| 
 |  | ||||||
| # }}} |  | ||||||
| 
 | 
 | ||||||
| # user | # user | ||||||
| - name: Create flexlm user | - name: Create flexlm user | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue