[root@localhost ~]# ansible localhost -m yum -a "name=cockpit state=present"
localhost | CHANGED => {
"ansible_facts": {
"pkg_mgr": "yum"
},
"changed": true,
"changes": {
"installed": [
"cockpit"
]
},
"msg": "http://centos.hbcse.tifr.res.in/centos/7.6.1810/extras/x86_64/Packages/cockpit-system-176-4.el7.centos.noarch.rpm: [Errno 12] Timeout on http://centos.hbcse.tifr.res.in/centos/7.6.1810/extras/x86_64/Packages/cockpit-system-176-4.el7.centos.noarch.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')\nTrying other mirror.\nhttp://centos-hcm.viettelidc.com.vn/7.6.1810/extras/x86_64/Packages/cockpit-system-176-4.el7.centos.noarch.rpm: [Errno 12] Timeout on http://centos-hcm.viettelidc.com.vn/7.6.1810/extras/x86_64/Packages/cockpit-system-176-4.el7.centos.noarch.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')\nTrying other mirror.\n",
"rc": 0,
"results": [
"Loaded plugins: fastestmirror, langpacks\nLoading mirror speeds from cached hostfile\n * base: mirror.nbrc.ac.in\n * epel: hkg.mirror.rackspace.com\n * extras: mirror.nbrc.ac.in\n * rpmforge: mirror.poliwangi.ac.id\n * updates: mirror.nbrc.ac.in\nResolving Dependencies\n--> Running transaction check\n---> Package cockpit.x86_64 0:176-4.el7.centos will be installed\n--> Processing Dependency: cockpit-ws for package: cockpit-176-4.el7.centos.x86_64\n--> Processing Dependency: cockpit-system for package: cockpit-176-4.el7.centos.x86_64\n--> Processing Dependency: cockpit-bridge for package: cockpit-176-4.el7.centos.x86_64\n--> Running transaction check\n---> Package cockpit-bridge.x86_64 0:176-4.el7.centos will be installed\n---> Package cockpit-system.noarch 0:176-4.el7.centos will be installed\n---> Package cockpit-ws.x86_64 0:176-4.el7.centos will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n cockpit x86_64 176-4.el7.centos extras 47 k\nInstalling for dependencies:\n cockpit-bridge x86_64 176-4.el7.centos extras 497 k\n cockpit-system noarch 176-4.el7.centos extras 1.2 M\n cockpit-ws x86_64 176-4.el7.centos extras 796 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package (+3 Dependent packages)\n\nTotal download size: 2.5 M\nInstalled size: 3.6 M\nDownloading packages:\n--------------------------------------------------------------------------------\nTotal 32 kB/s | 2.5 MB 01:21 \nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : cockpit-bridge-176-4.el7.centos.x86_64 1/4 \n Installing : cockpit-system-176-4.el7.centos.noarch 2/4 \n Installing : cockpit-ws-176-4.el7.centos.x86_64 3/4 \n Installing : cockpit-176-4.el7.centos.x86_64 4/4 \n Verifying : cockpit-system-176-4.el7.centos.noarch 1/4 \n Verifying : cockpit-ws-176-4.el7.centos.x86_64 2/4 \n Verifying : cockpit-176-4.el7.centos.x86_64 3/4 \n Verifying : cockpit-bridge-176-4.el7.centos.x86_64 4/4 \n\nInstalled:\n cockpit.x86_64 0:176-4.el7.centos \n\nDependency Installed:\n cockpit-bridge.x86_64 0:176-4.el7.centos \n cockpit-system.noarch 0:176-4.el7.centos \n cockpit-ws.x86_64 0:176-4.el7.centos \n\nComplete!\n"
]
}
[root@localhost ~]# ifconfig
br-11b615e29ddf: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.19.0.1 netmask 255.255.0.0 broadcast 0.0.0.0
ether 02:42:71:85:b4:d2 txqueuelen 0 (Ethernet)
RX packets 18348 bytes 3061044 (2.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 18348 bytes 3061044 (2.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 0.0.0.0
ether 02:42:cf:58:9a:bf txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.12 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::e9b6:a1b4:d2c0:6d7b prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:28:ae:db txqueuelen 1000 (Ethernet)
RX packets 11846 bytes 15049735 (14.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7618 bytes 581604 (567.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@localhost ~]# service cockpit status
Redirecting to /bin/systemctl status cockpit.service
● cockpit.service - Cockpit Web Service
Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static; vendor preset: disabled)
Active: inactive (dead)
Docs: man:cockpit-ws(8)
}
[root@localhost ~]# ansible localhost -m shell -a "service cockpit status"
[WARNING]: Consider using the service module rather than running 'service'. If you
need to use command because service is insufficient you can add 'warn: false' to this
command task or set 'command_warnings=False' in ansible.cfg to get rid of this
message.
localhost | FAILED | rc=3 >>
● cockpit.service - Cockpit Web Service
Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static; vendor preset: disabled)
Active: inactive (dead)
Docs: man:cockpit-ws(8)Redirecting to /bin/systemctl status cockpit.servicenon-zero return code
[root@localhost ~]# ansible localhost -m shell -a "service cockpit start"
[WARNING]: Consider using the service module rather than running 'service'. If you
need to use command because service is insufficient you can add 'warn: false' to this
command task or set 'command_warnings=False' in ansible.cfg to get rid of this
message.
localhost | CHANGED | rc=0 >>
Redirecting to /bin/systemctl start cockpit.service
[root@localhost ~]# ansible localhost -m shell -a "service cockpit status"
[WARNING]: Consider using the service module rather than running 'service'. If you
need to use command because service is insufficient you can add 'warn: false' to this
command task or set 'command_warnings=False' in ansible.cfg to get rid of this
message.
localhost | CHANGED | rc=0 >>
● cockpit.service - Cockpit Web Service
Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static; vendor preset: disabled)
Active: active (running) since Mon 2019-09-16 12:46:16 IST; 3min 25s ago
Docs: man:cockpit-ws(8)
Process: 16379 ExecStartPre=/usr/sbin/remotectl certificate --ensure --user=root --group=cockpit-ws --selinux-type=etc_t (code=exited, status=0/SUCCESS)
Main PID: 16383 (cockpit-ws)
Tasks: 3
CGroup: /system.slice/cockpit.service
├─16383 /usr/libexec/cockpit-ws
└─16450 /usr/bin/ssh-agent
Sep 16 12:46:16 localhost.localdomain systemd[1]: Starting Cockpit Web Service...
Sep 16 12:46:16 localhost.localdomain remotectl[16379]: /usr/bin/chcon: can't apply partial context to unlabeled file ‘/etc/cockpit/ws-certs.d/0-self-signed.cert’
Sep 16 12:46:16 localhost.localdomain remotectl[16379]: remotectl: couldn't change SELinux type context 'etc_t' for certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert: Child process exited with code 1
Sep 16 12:46:16 localhost.localdomain systemd[1]: Started Cockpit Web Service.
Sep 16 12:46:16 localhost.localdomain cockpit-ws[16383]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Sep 16 12:47:07 localhost.localdomain cockpit-session[16447]: pam_ssh_add: Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)
Sep 16 12:47:10 localhost.localdomain cockpit-ws[16383]: logged in user session
Sep 16 12:47:11 localhost.localdomain cockpit-ws[16383]: New connection to session from 192.168.1.12Redirecting to /bin/systemctl status cockpit.service
[root@localhost ~]#
localhost | CHANGED => {
"ansible_facts": {
"pkg_mgr": "yum"
},
"changed": true,
"changes": {
"installed": [
"cockpit"
]
},
"msg": "http://centos.hbcse.tifr.res.in/centos/7.6.1810/extras/x86_64/Packages/cockpit-system-176-4.el7.centos.noarch.rpm: [Errno 12] Timeout on http://centos.hbcse.tifr.res.in/centos/7.6.1810/extras/x86_64/Packages/cockpit-system-176-4.el7.centos.noarch.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')\nTrying other mirror.\nhttp://centos-hcm.viettelidc.com.vn/7.6.1810/extras/x86_64/Packages/cockpit-system-176-4.el7.centos.noarch.rpm: [Errno 12] Timeout on http://centos-hcm.viettelidc.com.vn/7.6.1810/extras/x86_64/Packages/cockpit-system-176-4.el7.centos.noarch.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')\nTrying other mirror.\n",
"rc": 0,
"results": [
"Loaded plugins: fastestmirror, langpacks\nLoading mirror speeds from cached hostfile\n * base: mirror.nbrc.ac.in\n * epel: hkg.mirror.rackspace.com\n * extras: mirror.nbrc.ac.in\n * rpmforge: mirror.poliwangi.ac.id\n * updates: mirror.nbrc.ac.in\nResolving Dependencies\n--> Running transaction check\n---> Package cockpit.x86_64 0:176-4.el7.centos will be installed\n--> Processing Dependency: cockpit-ws for package: cockpit-176-4.el7.centos.x86_64\n--> Processing Dependency: cockpit-system for package: cockpit-176-4.el7.centos.x86_64\n--> Processing Dependency: cockpit-bridge for package: cockpit-176-4.el7.centos.x86_64\n--> Running transaction check\n---> Package cockpit-bridge.x86_64 0:176-4.el7.centos will be installed\n---> Package cockpit-system.noarch 0:176-4.el7.centos will be installed\n---> Package cockpit-ws.x86_64 0:176-4.el7.centos will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n cockpit x86_64 176-4.el7.centos extras 47 k\nInstalling for dependencies:\n cockpit-bridge x86_64 176-4.el7.centos extras 497 k\n cockpit-system noarch 176-4.el7.centos extras 1.2 M\n cockpit-ws x86_64 176-4.el7.centos extras 796 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package (+3 Dependent packages)\n\nTotal download size: 2.5 M\nInstalled size: 3.6 M\nDownloading packages:\n--------------------------------------------------------------------------------\nTotal 32 kB/s | 2.5 MB 01:21 \nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : cockpit-bridge-176-4.el7.centos.x86_64 1/4 \n Installing : cockpit-system-176-4.el7.centos.noarch 2/4 \n Installing : cockpit-ws-176-4.el7.centos.x86_64 3/4 \n Installing : cockpit-176-4.el7.centos.x86_64 4/4 \n Verifying : cockpit-system-176-4.el7.centos.noarch 1/4 \n Verifying : cockpit-ws-176-4.el7.centos.x86_64 2/4 \n Verifying : cockpit-176-4.el7.centos.x86_64 3/4 \n Verifying : cockpit-bridge-176-4.el7.centos.x86_64 4/4 \n\nInstalled:\n cockpit.x86_64 0:176-4.el7.centos \n\nDependency Installed:\n cockpit-bridge.x86_64 0:176-4.el7.centos \n cockpit-system.noarch 0:176-4.el7.centos \n cockpit-ws.x86_64 0:176-4.el7.centos \n\nComplete!\n"
]
}
[root@localhost ~]# ifconfig
br-11b615e29ddf: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.19.0.1 netmask 255.255.0.0 broadcast 0.0.0.0
ether 02:42:71:85:b4:d2 txqueuelen 0 (Ethernet)
RX packets 18348 bytes 3061044 (2.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 18348 bytes 3061044 (2.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 0.0.0.0
ether 02:42:cf:58:9a:bf txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.12 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::e9b6:a1b4:d2c0:6d7b prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:28:ae:db txqueuelen 1000 (Ethernet)
RX packets 11846 bytes 15049735 (14.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7618 bytes 581604 (567.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@localhost ~]# service cockpit status
Redirecting to /bin/systemctl status cockpit.service
● cockpit.service - Cockpit Web Service
Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static; vendor preset: disabled)
Active: inactive (dead)
Docs: man:cockpit-ws(8)
}
[root@localhost ~]# ansible localhost -m shell -a "service cockpit status"
[WARNING]: Consider using the service module rather than running 'service'. If you
need to use command because service is insufficient you can add 'warn: false' to this
command task or set 'command_warnings=False' in ansible.cfg to get rid of this
message.
localhost | FAILED | rc=3 >>
● cockpit.service - Cockpit Web Service
Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static; vendor preset: disabled)
Active: inactive (dead)
Docs: man:cockpit-ws(8)Redirecting to /bin/systemctl status cockpit.servicenon-zero return code
[root@localhost ~]# ansible localhost -m shell -a "service cockpit start"
[WARNING]: Consider using the service module rather than running 'service'. If you
need to use command because service is insufficient you can add 'warn: false' to this
command task or set 'command_warnings=False' in ansible.cfg to get rid of this
message.
localhost | CHANGED | rc=0 >>
Redirecting to /bin/systemctl start cockpit.service
[root@localhost ~]# ansible localhost -m shell -a "service cockpit status"
[WARNING]: Consider using the service module rather than running 'service'. If you
need to use command because service is insufficient you can add 'warn: false' to this
command task or set 'command_warnings=False' in ansible.cfg to get rid of this
message.
localhost | CHANGED | rc=0 >>
● cockpit.service - Cockpit Web Service
Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static; vendor preset: disabled)
Active: active (running) since Mon 2019-09-16 12:46:16 IST; 3min 25s ago
Docs: man:cockpit-ws(8)
Process: 16379 ExecStartPre=/usr/sbin/remotectl certificate --ensure --user=root --group=cockpit-ws --selinux-type=etc_t (code=exited, status=0/SUCCESS)
Main PID: 16383 (cockpit-ws)
Tasks: 3
CGroup: /system.slice/cockpit.service
├─16383 /usr/libexec/cockpit-ws
└─16450 /usr/bin/ssh-agent
Sep 16 12:46:16 localhost.localdomain systemd[1]: Starting Cockpit Web Service...
Sep 16 12:46:16 localhost.localdomain remotectl[16379]: /usr/bin/chcon: can't apply partial context to unlabeled file ‘/etc/cockpit/ws-certs.d/0-self-signed.cert’
Sep 16 12:46:16 localhost.localdomain remotectl[16379]: remotectl: couldn't change SELinux type context 'etc_t' for certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert: Child process exited with code 1
Sep 16 12:46:16 localhost.localdomain systemd[1]: Started Cockpit Web Service.
Sep 16 12:46:16 localhost.localdomain cockpit-ws[16383]: Using certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert
Sep 16 12:47:07 localhost.localdomain cockpit-session[16447]: pam_ssh_add: Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)
Sep 16 12:47:10 localhost.localdomain cockpit-ws[16383]: logged in user session
Sep 16 12:47:11 localhost.localdomain cockpit-ws[16383]: New connection to session from 192.168.1.12Redirecting to /bin/systemctl status cockpit.service
[root@localhost ~]#
Comments
Post a Comment