上面使用了--vault-id @prompt作为ansible-vault的参数,当执行ansible-vault create时,这会以交互式的方式提示用户输入一个密码,这个密码是加密这个加密文件passwd_prompt.yml所需的密码。简单地说,这个文件里保存了加密的密码数据,但要访问这个文件,也需要密码。为了区分,本文之后将称该密码为"凭据密码"。 在上面的...
zbx-smartctl/create_ansible_role.sh Go to file Copy path Cannot retrieve contributors at this time executable file7 lines (6 sloc)302 Bytes RawBlame #!/bin/bash ANSIBLE_ROLE_DIR=./ansible-role-zabbix-smartmontools mkdir -p ./ansible-role-zabbix-smartmontools/files ...
cookiecutterhttps://github.com/iknite/cookiecutter-ansible-role.git It begin to ask you configuration variables then you can enter tasks names, handlers names, and default variables. Inside a Add <some> name i.e (<example>) you can go to next section by entering an empty string. ...
Image hardening– when you start the pipeline, Image Builder creates the required infrastructure to build your AMI, applies the Ansible role (CIS Amazon Linux 2 or Amazon Linux 2023 Benchmark) to the base AMI, and publishes the hardened AMI. A message is published to theAMI s...
Now, test your role by executing the playbook using theansible-playbookcommand and the playbook name, the same way you ran it in the previous article. If you've executed this playbook with thevimrole before, it will change the configuration file only if needed. If this is the first time ...
ToolCommand Azure CLI az network watcher show-next-hop PowerShell Get-AzNetworkWatcherNextHopPermissionsTo do tasks on route tables and routes, your account must be assigned to the Network contributor role or to a Custom role that's assigned the appropriate actions listed in the following table:...
s a bundle that uses Ansible to handle the same process. Another sample bundle uses Azure ARM templates to create a container running in an Azure Container Instance, and another sample builds a Kubernetes cluster on the Azure Kubernetes Service, deploying code via Helm and setting up role-based...
I use this in my ansible task - name: create service database shell: docker exec postgres sh -c '{ psql -U postgres -tc "SELECT 1" -d {{service_name}} &> /dev/null && echo -n 1; } || { psql -U postgres -c "CREATE DATABASE {{service_name}}"}' register: shell_result ...
The commands are the same as those given on the command line, without the preceding double dash (--). Registering the image for package installation There are some packages we need and some others that are just nice to have. Before we can install the packages, the operating system in the...
LAMP played a crucial role in the Web for over twenty years. NGINX was released publicly in 2004, largely to address faults in LAMP. LEMP use spread widely after 2008, and NGINX is now the second most popular Web server, after the Apache Web server that LAMP uses. Both LEMP and LAMP ...