---
- name: Install Software
hosts: all
become: true
tasks:
- name: Update package cache
package: # Use the package module
name: "{{ item }}"
state: present
with_items: # Loop over the package list
- vim
- tree
- figlet
ignore_errors: yes # Ignore errors if packages fail to install
retries: 3 # Number of retries if task fails
delay: 10 # Delay between retries in seconds
我创建了一个应用程序,通过单击按钮自动启动 Zoom 会议,它似乎可以在 Windows 10 上运行,但在 Ubuntu 上却不行,我不确定它是否能在另一台机器上运行。我有一份
我创建了一个应用程序,通过单击按钮自动启动缩放会议,它似乎可以在 Windows 10 上运行,但不能在 Ubuntu 上运行,我不确定它是否可以在另一台机器上运行。我有一个定期会议列表,我将其详细信息集成到一个配置文件中,该文件包含会议的名称、小时、天数、无限期和密码。我试图调用缩放过程并通过单击按钮启动所选会议。它在我的 Windows 机器上运行良好,但在我的另一台 Ubuntu 机器上没有任何反应我尝试了这个函数,它应该被称为缩放过程,并给它配置文件中存在的连接信息
def lancer_zoom(nom_reunion):
try:
with open('config.json', 'r') as fichier:
donnees = json.load(fichier)
reunion = donnees.get(nom_reunion)
if reunion:
identifiant_reunion = reunion.get('identifiant')
mot_de_passe_reunion = reunion.get('mot_de_passe')
if identifiant_reunion and mot_de_passe_reunion:
commande_zoom = f'start "" "zoommtg://zoom.us/join?confno={identifiant_reunion}&pwd={mot_de_passe_reunion}"'
subprocess.run(commande_zoom, shell=True)
else:
print(f"Informations manquantes pour la réunion {nom_reunion}.")
else:
print(f"Réunion {nom_reunion} non trouvée.")
except FileNotFoundError:
print("Fichier de configuration introuvable.")
_ ERROR collecting tests/test_load_protobuf_data.py _
tests/test_load_protobuf_data:7: in <module>
from src.protobuf_classes import testdata_pb2 as Testdata
src.protobuf_classes/testdata_pb2.py:17: in <module>
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
E TypeError: Couldn't build proto file into descriptor pool: Depends on file 'google/protobuf/timestamp.proto', but it has not been loaded
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1567 (apt-get)\nE: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
[Tooltip("Where to move to (worldspace)")]
[SerializeField]
private Vector3 targetPosition;
[Tooltip("How fast to move (unit/s)")]
[SerializeField]
private float moveSpeed;
[Tooltip("How long to wait on the start/end positions")]
[SerializeField]
private float delay = 2f;
private Vector3 startPosition;
private IEnumerator Start()
{
startPosition = transform.position;
// This is totally fine for a Coroutine as long as you ensure you yield
while(true)
{
// move to target with given speed
yield return MoveTowards(transform, targetPosition, moveSpeed);
// wait for delay
yield return new WaitForSeconds(delay);
// move back to start with given speed
yield return MoveTowards(transform, startPosition, moveSpeed);
// wait for delay
yield return new WaitForSeconds(delay);
}
}
private static IEnumerator MoveTowards(Transform transform, Vector3 target, float moveSpeed)
{
// Vector3 == uses approximation with precision 1e-5
while(transform.position != target)
{
// every iteration moves one step towards the target without overshooting
transform.position = Vector3.MoveTowards(transform.position, target, moveSpeed * Time.deltaTime);
// "pauses" the coroutine, let Unity render this frame
// and continue from here in the next frame
yield return null;
}
// to end with clean values
transform.position = target;
}