![]() ![]() #Cetos systemname install#name : Install the latest version of Apache : name : httpd state : latest - name : Install Apache >= 2.4 : name : httpd>=2.4 state : present - name : Install a list of packages (suitable replacement for 2.11 loop deprecation warning) : name : - nginx - postgresql - postgresql-server state : present - name : Install a list of packages with a list variable : name : " " vars : packages : - httpd - httpd-tools - name : Remove the Apache package : name : httpd state : absent - name : Install the latest version of Apache from the testing repo : name : httpd enablerepo : testing state : present - name : Install one specific version of Apache : name : httpd-2.2.29-1.4.amzn1 state : present - name : Upgrade all packages : name : '*' state : latest - name : Upgrade all packages, excluding kernel & foo related packages : name : '*' state : latest exclude : kernel*,foo* - name : Install the nginx rpm from a remote repo : name : state : present - name : Install nginx rpm from a local file : name : /usr/local/src/.rpm state : present - name : Install the 'Development tools' package group : name : tools" state : present - name : Install the 'Gnome desktop' environment group : name : state : present - name : List ansible packages and register result to print with debug later : list : ansible register : result - name : Install package with multiple repos enabled : name : sos enablerepo : "epel,ol7_latest" - name : Install package with multiple repos disabled : name : sos disablerepo : "epel,ol7_latest" - name : Download the nginx package but do not install it Azure Connected Machine agent enables you to manage your Windows and Linux machines hosted outside of Azure on your corporate network or other cloud providers. The yum module does not support clearing yum cache in an idempotent way, so it was decided not to implement it, the only method is to use command and call the yum command directly, namely “command: yum clean all” Package groups are specified as and environment groups are Use the “yum group list hidden ids” command to see which category of group the group you want to install falls into. Unfortunately, this division becomes apparent to ansible users because ansible needs to operate on the group of packages in a single transaction and yum requires groups to be specified in different ways when used in that way. “Package groups” are specified in the rpm itself while “environment groups” are specified in a separate file (usually by the distribution). This mimics yum’s command line behaviour. However, if one of the packages adds a new yum repository that the other packages come from (such as epel-release) then that package needs to be installed in a separate task. In 1.9.2 this was fixed so that packages are installed in one yum transaction. This caused problems when packages specified by filename or url had to be installed or removed together. In versions prior to 1.9.2 this module installed and removed each package given to the yum module separately. When used with a loop: each package will be processed individually, it is much more efficient to pass the list directly to the name option.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |