收藏文章 楼主

英语翻译

版块:英语   类型:置顶   作者:小绿叶技术博客   查看:3270   回复:0   获赞:0   时间:2021-03-29 16:13:26

 翻译任务

# 配置文件


/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"

The authenticity of host '43.255.28.59 (43.255.28.59)' can't be established.

ECDSA key fingerprint is SHA256:SgnNPfBBj4ynUSaUeOSVU95OYhpEvezPoFQB24+J/Ak.

ECDSA key fingerprint is MD5:b2:aa:54:c8:87:20:3e:08:9b:9f:4f:bb:de:12:53:2c.

Are you sure you want to continue connecting (yes/no)? yes

/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys

root@43.255.28.59's password: 


Number of key(s) added: 1



Now try logging into the machine, with:   "ssh 'root@43.255.28.59'"

and check to make sure that only the key(s) you wanted were added.

43.255.28.59 | CHANGED | rc=0 >>




# This is the default ansible 'hosts' file.

#

# It should live in /etc/ansible/hosts

#

#   - Comments begin with the '#' character

#   - Blank lines are ignored

#   - Groups of hosts are delimited by [header] elements

#   - You can enter hostnames or ip addresses

#   - A hostname/ip can be a member of multiple groups


# Ex 1: Ungrouped hosts, specify before any group headers.


## green.example.com

## blue.example.com

## 192.168.100.1

## 192.168.100.10


# Ex 2: A collection of hosts belonging to the 'webservers' group


## [webservers]

## alpha.example.org

## beta.example.org

## 192.168.1.100

## 192.168.1.110


# If you have multiple hosts following a pattern you can specify

# them like this:


## www[001:006].example.com


# Ex 3: A collection of database servers in the 'dbservers' group


## [dbservers]

## 

## db01.intranet.mydomain.net

## db02.intranet.mydomain.net

## 10.25.1.56

## 10.25.1.57


# Here's another example of host ranges, this time there are no

# leading 0s:


## db-[99:101]-node.example.com



deprecation warning


ansible facts ; discovered interpreter




# 执行ansible 出错

ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each:

JSON: No JSON object could be decoded


Syntax Error while loading YAML.

  did not find expected key


The error appears to be in '/root/a1.yml': line 6, column 41, but may

be elsewhere in the file depending on the exact syntax problem.


The offending line appears to be:


    - name: 查看磁盘

      shell: "touch ansible.txt ; echo "启动ansible 自动化工具" >> ansible.txt" #执行的命令

                                        ^ here

This one looks easy to fix. It seems that there is a value started

with a quote, and the YAML parser is expecting to see the line ended

with the same kind of quote. For instance:

    when: "ok" in result.stdout

Could be written as:

   when: '"ok" in result.stdout'

Or equivalently:


   when: "'ok' in result.stdout"

We could be wrong, but this one looks like it might be an issue with

unbalanced quotes. If starting a value with a quote, make sure the

line ends with the same set of quotes. For instance this arbitrary

example:


    foo: "bad" "wolf"

Could be written as:

    foo: '"bad" "wolf"'



# 添加

The above portion is simple and works. Now I want to write the output to file.

Now im trying to write this information to a file.I want something like:

Kubernetes v1.4.0 Kubernetes v1.4.0 Kubernetes v1.4.0 Kubernetes v1.4.0

So I added the below line:



提供企业建站服务,免费网防系统,提交信息登录 http://yundun.ddoss.cn 邮箱: proposal@ddoss.cn 
回复列表
默认   热门   正序   倒序

回复:英语翻译

头像

用户名:

粉丝数:

签名:

资料 关注 好友 消息