ubuntu安装php及ansible命令
安装php命令
apt install -y php php-bcmath php-cli php-common php-fpm php-gd php-intl php-mbstring php-mysqlnd php-opcache php-pdo php-xml php-json
安装ansible命令
apt install -y software-properties-common
add-apt-repository --yes --update ppa:ansible/ansible
apt update
apt install -y ansible
ansible配置文件
cat >>/etc/ansible/ansible.cfg<<EOF
[defaults]
remote_user = root
host_key_checking = False
remote_port = 22
log_path = /var/log/ansible.log
inventory = /etc/ansible/hosts
[privilege_escalation]
become=True
become_method=sudo
become_user=root
become_ask_pass=False
EOF